Skip to content

Commit c6ccbb5

Browse files
Fix About dialog version display for local and GitHub Actions builds
🔧 Version Display Fixes: - Fixed appVersion to remove 'v' prefix for consistent display - Updated buildNumber to handle both local (git hash) and GitHub Actions (number) builds - Updated gitHash to show first 7 characters for better readability - Added comments explaining different build scenarios 📱 About Dialog Improvements: - Version now displays as '1.0.28' instead of 'v1.0.28' - Build number shows git commit hash for local builds - Git hash shows shortened format (ee22656) for readability - Consistent formatting across different build types This ensures About dialog shows correct version information for both local development builds and GitHub Actions releases.
1 parent ee22656 commit c6ccbb5

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

A6Cutter/AboutView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ struct AboutView: View {
7171

7272
private var appVersion: String {
7373
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
74-
return version
74+
// Remove 'v' prefix if present for consistent display
75+
return version.hasPrefix("v") ? String(version.dropFirst()) : version
7576
}
7677
return "Deve"
7778
}
7879

7980
private var buildNumber: String {
8081
if let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
82+
// For local builds, CFBundleVersion is git commit hash
83+
// For GitHub Actions builds, it might be a number
8184
return build
8285
}
8386
return "dev"

A6Cutter/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundleSignature</key>
1818
<string>????</string>
1919
<key>CFBundleVersion</key>
20-
<string>c4dc1dc</string>
20+
<string>ee22656</string>
2121
<key>GitHash</key>
22-
<string>c4dc1dcb3d6a31c8b741b97b66344292228da49a</string>
22+
<string>ee22656a4bdce133cbcf134951c0b9b07b57c05e</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>14.0</string>
2525
<key>NSHumanReadableCopyright</key>

0 commit comments

Comments
 (0)