Skip to content

Instantly share code, notes, and snippets.

@lgraubner
Created October 1, 2019 19:31
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 lgraubner/67f9e1af5040322625dbf73f3624f772 to your computer and use it in GitHub Desktop.
Save lgraubner/67f9e1af5040322625dbf73f3624f772 to your computer and use it in GitHub Desktop.
Automatically increment Xcode release build number
if [ "$CONFIGURATION" = "Release" ]; 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