Created
May 17, 2019 11:20
-
-
Save adipurnama/18477c84a08445c81d1cbff2ba5f5973 to your computer and use it in GitHub Desktop.
XCode increase build number + date
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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$PRODUCT_SETTINGS_PATH") | |
buildNumber=$(cut -d'.' -f2 <<<$buildNumber) | |
buildNumber=$(date +"%y%m%d")"."$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$PRODUCT_SETTINGS_PATH" | |
#180925.1008 First is the current date and after the dot the build number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment