Created
December 2, 2012 19:51
-
-
Save micahpearlman/4190695 to your computer and use it in GitHub Desktop.
Auto increment build numbers in XCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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