Skip to content

Instantly share code, notes, and snippets.

@pulkitsinghal
Created August 10, 2013 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pulkitsinghal/6202511 to your computer and use it in GitHub Desktop.
Save pulkitsinghal/6202511 to your computer and use it in GitHub Desktop.
Auto Increment Version Script
# Auto Increment Version Script
buildPlist=${INFOPLIST_FILE}
CFBuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist)
CFBuildNumber=$(($CFBuildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBuildNumber $CFBuildNumber" $buildPlist
CFBuildDate=$(date)
/usr/libexec/PlistBuddy -c "Set :CFBuildDate $CFBuildDate" $buildPlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment