config: show git hash in version info

This will be useful for sanity checks and bisecting
This commit is contained in:
William Casarin
2023-08-01 08:27:47 -07:00
parent a9b4cfd424
commit d4aa8a5602
4 changed files with 83 additions and 8 deletions

View File

@@ -94,12 +94,16 @@ struct ConfigView: View {
})
}
}
if let bundleShortVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"], let bundleVersion = Bundle.main.infoDictionary?["CFBundleVersion"] {
Section(NSLocalizedString("Version", comment: "Section title for displaying the version number of the Damus app.")) {
Text(verbatim: "\(bundleShortVersion) (\(bundleVersion))")
}
Section(NSLocalizedString("Version", comment: "Section title for displaying the version number of the Damus app.")) {
Text(verbatim: VersionInfo.version)
.contextMenu {
Button {
UIPasteboard.general.string = VersionInfo.version
} label: {
Label(NSLocalizedString("Copy", comment: "Context menu option for copying the version of damus."), image: "copy2")
}
}
}
}
}