Last active
August 29, 2015 13:56
-
-
Save pi-chan/9249157 to your computer and use it in GitHub Desktop.
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
# script for incrementing short version string for Xcode. | |
InfoPlist="${SRCROOT}/${INFOPLIST_FILE}" | |
buildNumber=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $InfoPlist` | |
buildNumber=`echo $buildNumber + 1.0 | bc` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" $InfoPlist | |
vvv=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $InfoPlist` | |
mm=`echo $vvv | cut -d . -f 1,2` | |
last=`echo $vvv | cut -d . -f 3` | |
last=$(($last+1)) | |
ver=$mm.$last | |
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $ver" $InfoPlist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment