Created
December 2, 2017 12:46
-
-
Save Hucent/f0617ef65a87a8a324d2db8c196ce8cd to your computer and use it in GitHub Desktop.
Update Build Number
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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
todayday=`date +"%Y%m%d"` | |
bb=`echo $buildNumber|grep $todayday|wc -l` | |
if [ $bb = 0 ] | |
then | |
buildNumber="$todayday""001" | |
else | |
buildNumber=$(($buildNumber + 1)) | |
fi | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment