Skip to content

Instantly share code, notes, and snippets.

@kommen
Created October 24, 2011 08:10
Show Gist options
  • Save kommen/1308569 to your computer and use it in GitHub Desktop.
Save kommen/1308569 to your computer and use it in GitHub Desktop.
Pre-Archive action for Xcode 4.2 to auto increment CFBundleVersion
buildPlist="${SRCROOT}/${INFOPLIST_FILE}"
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $buildPlist)
CFBundleVersion=$(($CFBundleVersion + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" $buildPlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment