Created
November 28, 2015 00:26
-
-
Save tiagobbraga/8f52cbc7c5e749c03cd3 to your computer and use it in GitHub Desktop.
CFBundleShortVersionString with CFBundleVersion
This file contains 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 | |
cV=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE") | |
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
b=${bN##*.} | |
bN=$((b += 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $cV.$bN" "$INFOPLIST_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment