Skip to content

Instantly share code, notes, and snippets.

@jkyin
Created October 30, 2014 08:28
Show Gist options
  • Save jkyin/a71fa5201fa48c579b40 to your computer and use it in GitHub Desktop.
Save jkyin/a71fa5201fa48c579b40 to your computer and use it in GitHub Desktop.
Automatically increment Xcode build number
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}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment