Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[IP-574] [Core] Show commit hash in settings

  • Loading branch information
Pavel authored and pavel-cliqz committed Jun 5, 2019
1 parent 5d0e3a1 commit 4f6c9f24be68abc42d510a4c832dab180e338eca
Showing with 6 additions and 3 deletions.
  1. +2 −0 Client/Info.plist
  2. +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)
}
}

0 comments on commit 4f6c9f2

Please sign in to comment.