From 272bf74b26d2a5c9cef17db7468686c87697d508 Mon Sep 17 00:00:00 2001
From: Robin Appelman <robin@icewind.nl>
Date: Mon, 22 Feb 2021 21:13:38 +0100
Subject: [PATCH] dont count minor version for version compare

---
 lib/SelfTest.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/SelfTest.php b/lib/SelfTest.php
index 092b037..4857f2d 100644
--- a/lib/SelfTest.php
+++ b/lib/SelfTest.php
@@ -156,12 +156,13 @@ class SelfTest {
 			return 1;
 		}
 		$appVersion = $this->appManager->getAppVersion('notify_push');
+		$appVersionNoMinor = substr($appVersion, 0, strrpos($appVersion, '.'));
+		$binaryVersionNoMinor = substr($binaryVersion, 0, strrpos($binaryVersion, '.'));
 
-		if ($appVersion === $binaryVersion) {
+		if ($appVersionNoMinor === $binaryVersionNoMinor) {
 			$output->writeln("<info>✓ push server is running the same version as the app</info>");
 		} else {
 			$output->writeln("<error>🗴 push server (version $binaryVersion) is not the same version as the app (version $appVersion).</error>");
-			return 1;
 		}
 
 		return 0;
-- 
GitLab