Skip to content

Instantly share code, notes, and snippets.

@gintsmurans
Created March 27, 2013 06:57
Show Gist options
  • Save gintsmurans/5252301 to your computer and use it in GitHub Desktop.
Save gintsmurans/5252301 to your computer and use it in GitHub Desktop.
Bash script for XCode build number automatic increment
#!/bin/bash
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
bN=$(echo $bN + 1 | bc)
bN=${bN/\.*}
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment