Created
May 17, 2018 10:07
-
-
Save Ariandr/033ac61fde405b180d866b385d95642c to your computer and use it in GitHub Desktop.
Adding the automated script for incrementing a 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
| #In your Xcode target project settings select the "Build phases" tab. | |
| #Click the "+" button add select "New Run Script Phase" | |
| #In the script area paste this tiny script which will increment the bundle version every time the project is built: | |
| #!/bin/bash | |
| # This script takes the build number from the release target plist, increments and then saves back | |
| bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PRODUCT_SETTINGS_PATH}") | |
| bN=$(($bN + 1)) | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "${PRODUCT_SETTINGS_PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment