Skip to content

Instantly share code, notes, and snippets.

@Shinolr
Created December 20, 2019 02:42
Show Gist options
  • Save Shinolr/ff7952e38881d4db991d4596fea85a44 to your computer and use it in GitHub Desktop.
Save Shinolr/ff7952e38881d4db991d4596fea85a44 to your computer and use it in GitHub Desktop.
Auto increment build number
#!/bin/sh
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