mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-04-01 17:20:09 +02:00
🐛 Fix issue with version parser
This commit is contained in:
@@ -86,14 +86,12 @@ class AppUpdateChecker {
|
|||||||
+ "(\(onlineVersion.computerReadable) > \(currentVersion.computerReadable))")
|
+ "(\(onlineVersion.computerReadable) > \(currentVersion.computerReadable))")
|
||||||
notifyAboutNewerVersion(version: onlineVersion)
|
notifyAboutNewerVersion(version: onlineVersion)
|
||||||
case .orderedSame:
|
case .orderedSame:
|
||||||
// Check if the build number differs
|
|
||||||
if currentVersion.build != nil
|
if currentVersion.build != nil
|
||||||
&& onlineVersion.build != nil
|
&& onlineVersion.build != nil
|
||||||
&& buildDiffers(currentVersion, onlineVersion, background) {
|
&& buildDiffers(currentVersion, onlineVersion, background) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the build number does not differ... it's the same release
|
|
||||||
Log.info("The installed version (\(currentVersion.computerReadable)) matches the latest release "
|
Log.info("The installed version (\(currentVersion.computerReadable)) matches the latest release "
|
||||||
+ "(\(onlineVersion.computerReadable)).")
|
+ "(\(onlineVersion.computerReadable)).")
|
||||||
if !background { notifyVersionDoesNotNeedUpgrade() }
|
if !background { notifyVersionDoesNotNeedUpgrade() }
|
||||||
|
|||||||
@@ -63,14 +63,11 @@ class AppVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static func fromCurrentVersion() -> AppVersion {
|
public static func fromCurrentVersion() -> AppVersion {
|
||||||
return AppVersion(
|
return AppVersion.from("\(App.shortVersion)_\(App.bundleVersion)")!
|
||||||
version: VersionExtractor.from(App.shortVersion)!,
|
|
||||||
build: App.bundleVersion
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var computerReadable: String {
|
var computerReadable: String {
|
||||||
return "\(version)_\(build ?? "???")"
|
return "\(version)_\(build ?? "0")"
|
||||||
}
|
}
|
||||||
|
|
||||||
var humanReadable: String {
|
var humanReadable: String {
|
||||||
|
|||||||
Reference in New Issue
Block a user