Created
May 29, 2012 11:39
-
-
Save kmonaghan/2827983 to your computer and use it in GitHub Desktop.
Example script to update Bundle version using number of git commits before archiving an iOS project in Xcode. See http://www.karlmonaghan.com/2012/05/30/auto-versioning-and-auto-uploading-to-testflighthockeyapp-when-archiving-in-xcode/ for more informatio
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
GIT=`which git` | |
REV=`$GIT --git-dir=${SOURCE_ROOT}/.git log --pretty=format:'' | wc -l | sed 's/\ //g'` | |
BASEVERNUM=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${SOURCE_ROOT}"/"${INFOPLIST_FILE}"` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BASEVERNUM.$REV" "${SOURCE_ROOT}"/"${INFOPLIST_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment