Skip to content

Instantly share code, notes, and snippets.

@beny
Created October 4, 2012 16:44
Show Gist options
  • Save beny/3834854 to your computer and use it in GitHub Desktop.
Save beny/3834854 to your computer and use it in GitHub Desktop.
Xcode build number auto increment
conf=${CONFIGURATION}
if [ $conf != "Debug" ]
then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist)
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment