Created
June 2, 2015 07:56
-
-
Save mwermuth/3027de74d85c9349b95f to your computer and use it in GitHub Desktop.
Updating Xcode Build number for iOS App Target
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
branch=${1:-'master'} | |
buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count)) | |
echo "Updating build number to $buildNumber using branch '$branch' for App Target." | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}.dSYM/Contents/Info.plist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment