Skip to content

Instantly share code, notes, and snippets.

@ijansch
Created July 14, 2014 15:42
Show Gist options
  • Save ijansch/187845faf6aea780fb99 to your computer and use it in GitHub Desktop.
Save ijansch/187845faf6aea780fb99 to your computer and use it in GitHub Desktop.
Including the buildozer build number in an app
#!/bin/bash
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE")
if [ -n "$BUILDOZER_BUILDNUMBER" ]; then
buildNumber=$BUILDOZER_BUILDNUMBER
else
buildNumber="dev"
fi
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildVersion.$buildNumber" "$INFOPLIST_FILE"
@ijansch
Copy link
Author

ijansch commented Jul 14, 2014

You'd place this in a 'run script' build phase. (mind the order, it must update the plist before it actually builds the app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment