Created
May 30, 2012 21:10
-
-
Save kmonaghan/2838992 to your computer and use it in GitHub Desktop.
Example script to update Bundle version using svn version number 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 information.
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
SVN=`which svnversion` | |
REV=`${SVN} -nc ${SOURCE_ROOT} | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'` | |
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