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:
@ -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() }
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user