Fixed version checking issue
This commit is contained in:
parent
174f7b999b
commit
c58df61ccc
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user