Skip to content

Instantly share code, notes, and snippets.

@andreacfm
Forked from c0diq/gist:2213492
Last active December 29, 2015 15:19
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 andreacfm/7689669 to your computer and use it in GitHub Desktop.
Save andreacfm/7689669 to your computer and use it in GitHub Desktop.
Increment the build number when creating an AdHoc build
#!/bin/bash
if [[ $CONFIGURATION == *AdHoc* ]]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${PROJECT_DIR}/${INFOPLIST_FILE})
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${INFOPLIST_FILE}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment