Skip to content

Commit a463548

Browse files
committed
feat: add build number to Info.plist during post-installation
1 parent 176b370 commit a463548

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

client/ios/Podfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,11 @@ post_install do |installer|
5151
]
5252
end
5353
end
54+
55+
build_number = `git rev-list --count HEAD`.strip
56+
puts "Git Build Number: #{build_number}"
57+
info_plist_path = File.join(__dir__, 'Runner/Info.plist')
58+
if File.exist?(info_plist_path) && !build_number.empty?
59+
system("/usr/libexec/PlistBuddy", "-c", "Set :CFBundleVersion #{build_number}", info_plist_path)
60+
end
5461
end

0 commit comments

Comments
 (0)