Fixed version checking issue

This commit is contained in:
RemixDev 2022-02-05 11:44:36 +01:00
parent 174f7b999b
commit c58df61ccc
1 changed files with 6 additions and 2 deletions

View File

@ -102,7 +102,7 @@ export class DeemixApp {
parseVersion(version: string | null): any { parseVersion(version: string | null): any {
if (version === null || version === 'continuous' || version === 'NotFound') return null if (version === null || version === 'continuous' || version === 'NotFound') return null
try { try {
const matchResult = version.match(/(\d+)\.(\d+)\.(\d+)-r(\d)+\.(.+)/) || [] const matchResult = version.match(/(\d+)\.(\d+)\.(\d+)-r(\d+)\.(.+)/) || []
return { return {
year: parseInt(matchResult[1]), year: parseInt(matchResult[1]),
month: parseInt(matchResult[2]), month: parseInt(matchResult[2]),
@ -124,7 +124,11 @@ export class DeemixApp {
if (latestVersionObj.month > currentVersionObj.month) return true if (latestVersionObj.month > currentVersionObj.month) return true
if (latestVersionObj.day > currentVersionObj.day) return true if (latestVersionObj.day > currentVersionObj.day) return true
if (latestVersionObj.revision > currentVersionObj.revision) 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 return false
} }