Skip to content

Instantly share code, notes, and snippets.

@micahpearlman
Created December 2, 2012 19:51
Show Gist options
  • Save micahpearlman/4190695 to your computer and use it in GitHub Desktop.
Save micahpearlman/4190695 to your computer and use it in GitHub Desktop.
Auto increment build numbers in XCode
#!/bin/bash
#### see: http://stackoverflow.com/questions/10091310/heres-how-to-auto-increment-the-build-number-in-xcode
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
bN=$((0x$bN))
bN=$(($bN + 1))
bN=$(printf "%X" $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