Last active
March 29, 2016 20:08
-
-
Save tadpol/28988edd77a37ee7772313014f45594d to your computer and use it in GitHub Desktop.
Xcode Build Phase scripts for setting build number
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
# This goes at the end of the Build Phases | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion DEVEL" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
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
# This goes at the beginning. (or near to) | |
buildNumber=$(git rev-list --count HEAD) | |
/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