1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 12:00:09 +02:00

🐛 Fix issue with version parser

This commit is contained in:
2022-05-10 19:01:37 +02:00
parent c16377c688
commit 78cb6922b3
2 changed files with 2 additions and 7 deletions

View File

@ -86,14 +86,12 @@ class AppUpdateChecker {
+ "(\(onlineVersion.computerReadable) > \(currentVersion.computerReadable))")
notifyAboutNewerVersion(version: onlineVersion)
case .orderedSame:
// Check if the build number differs
if currentVersion.build != nil
&& onlineVersion.build != nil
&& buildDiffers(currentVersion, onlineVersion, background) {
return
}
// If the build number does not differ... it's the same release
Log.info("The installed version (\(currentVersion.computerReadable)) matches the latest release "
+ "(\(onlineVersion.computerReadable)).")
if !background { notifyVersionDoesNotNeedUpgrade() }

View File

@ -63,14 +63,11 @@ class AppVersion {
}
public static func fromCurrentVersion() -> AppVersion {
return AppVersion(
version: VersionExtractor.from(App.shortVersion)!,
build: App.bundleVersion
)
return AppVersion.from("\(App.shortVersion)_\(App.bundleVersion)")!
}
var computerReadable: String {
return "\(version)_\(build ?? "???")"
return "\(version)_\(build ?? "0")"
}
var humanReadable: String {