Last active
December 20, 2015 01:09
-
-
Save chourobin/6047370 to your computer and use it in GitHub Desktop.
My custom bump build number script
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
| # Using HEX builds (e.g. 1A12) | |
| #!/bin/sh | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
| dec=$((0x$buildNumber)) | |
| buildNumber=$(($dec + 1)) | |
| hex=$(printf "%X" $buildNumber) | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $hex" "$INFOPLIST_FILE" | |
| # Using numerical builds | |
| #!/bin/sh | |
| 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