Created
February 26, 2011 19:41
-
-
Save madninja/845548 to your computer and use it in GitHub Desktop.
Inject git version info into Info.plist and iOS settings
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 | |
cd $PROJECT_DIR | |
BUILD_VERSION=`/usr/local/bin/git rev-parse --short HEAD` | |
cd "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app" | |
RELEASE_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Info.plist) | |
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $BUILD_VERSION" Info.plist | |
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:1:DefaultValue $RELEASE_VERSION ($BUILD_VERSION)" Settings.bundle/Root.plist |
Yes this is very helpful. Thank you very much! :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Done.. thanks again.. I use this daily and am glad someone else finds it useful