Skip to content

Instantly share code, notes, and snippets.

@es-kumagai
Created May 20, 2014 05:27
Show Gist options
  • Save es-kumagai/fb8ecf5e2cda0a05f83a to your computer and use it in GitHub Desktop.
Save es-kumagai/fb8ecf5e2cda0a05f83a to your computer and use it in GitHub Desktop.
infoPlistFile="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${infoPlistFile}")
buildNumber=$((${buildNumber%%.*} + 1))
/usr/libexec/PlistBuddy -c "Set:CFBundleVersion $buildNumber" "${infoPlistFile}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment