Created
March 31, 2012 07:20
-
-
Save ghawkgu/2260320 to your computer and use it in GitHub Desktop.
Increase build number of an Xcode project for each build.
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
#! /bin/bash | |
# Increase build number for each build. | |
# Use "Run Script" to append this script into a project's scheme. | |
buildNumber=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist) | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment