Skip to content

Instantly share code, notes, and snippets.

@jrturton
Created October 8, 2013 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrturton/6881601 to your computer and use it in GitHub Desktop.
Save jrturton/6881601 to your computer and use it in GitHub Desktop.
Increment build number at every archive or release build
if [ $CONFIGURATION = "Release" ] || [ $CONFIGURATION = "Dev" ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment