Skip to content

Instantly share code, notes, and snippets.

@michaeldwan
Created November 25, 2013 22:58
Show Gist options
  • Save michaeldwan/7650452 to your computer and use it in GitHub Desktop.
Save michaeldwan/7650452 to your computer and use it in GitHub Desktop.
Script to increment CFBundleVersion during the build phase
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment