From c58df61ccc3da26b2d5886a63575d57a32775b0e Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 5 Feb 2022 11:44:36 +0100 Subject: [PATCH] Fixed version checking issue --- server/src/app.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/app.ts b/server/src/app.ts index 75b9024..618b9c5 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -102,7 +102,7 @@ export class DeemixApp { parseVersion(version: string | null): any { if (version === null || version === 'continuous' || version === 'NotFound') return null try { - const matchResult = version.match(/(\d+)\.(\d+)\.(\d+)-r(\d)+\.(.+)/) || [] + const matchResult = version.match(/(\d+)\.(\d+)\.(\d+)-r(\d+)\.(.+)/) || [] return { year: parseInt(matchResult[1]), month: parseInt(matchResult[2]), @@ -124,7 +124,11 @@ export class DeemixApp { if (latestVersionObj.month > currentVersionObj.month) return true if (latestVersionObj.day > currentVersionObj.day) return true if (latestVersionObj.revision > currentVersionObj.revision) return true - if (latestVersionObj.commit !== currentVersionObj.commit) return true + if ( + latestVersionObj.revision === currentVersionObj.revision && + latestVersionObj.commit !== currentVersionObj.commit + ) + return true return false }