Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[IP-574] [Core] Show commit hash in settings
- Loading branch information
Showing
with
6 additions
and
3 deletions.
-
+2
−0
Client/Info.plist
-
+4
−3
Cliqz/Services/AppStatus.swift
|
|
@@ -180,5 +180,7 @@ |
|
|
</array> |
|
|
<key>VPNPass</key> |
|
|
<string></string> |
|
|
<key>CommitHash</key> |
|
|
<string></string> |
|
|
</dict> |
|
|
</plist> |
|
|
@@ -31,7 +31,7 @@ class AppStatus { |
|
|
|
|
|
class func distVersion() -> String { |
|
|
let versionDescriptor = AppStatus.getVersionDescriptor() |
|
|
return "\(versionDescriptor.version.trim()) (\(versionDescriptor.buildNumber))" |
|
|
return "\(versionDescriptor.version.trim()) (\(versionDescriptor.commitHash ?? versionDescriptor.buildNumber))" |
|
|
} |
|
|
|
|
|
class func extensionVersion() -> String { |
|
|
@@ -47,7 +47,7 @@ class AppStatus { |
|
|
return "" |
|
|
} |
|
|
|
|
|
fileprivate class func getVersionDescriptor() -> (version: String, buildNumber: String) { |
|
|
fileprivate class func getVersionDescriptor() -> (version: String, buildNumber: String, commitHash: String?) { |
|
|
|
|
|
var version = "0" |
|
|
var buildNumber = "0" |
|
|
@@ -58,7 +58,8 @@ class AppStatus { |
|
|
if let bundleVersion = Bundle.main.infoDictionary?["CFBundleVersion"] as? String { |
|
|
buildNumber = bundleVersion |
|
|
} |
|
|
let commitHash = Bundle.main.infoDictionary?["CommitHash"] as? String |
|
|
|
|
|
return (version, buildNumber) |
|
|
return (version, buildNumber, commitHash) |
|
|
} |
|
|
} |