Created
July 14, 2010 20:36
-
-
Save jdg/476028 to your computer and use it in GitHub Desktop.
include git revision number in info.plist
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 | |
# Include commit rev script by @bsneed | |
buildPlist="${PRODUCT_NAME}-Info.plist" | |
buildCommit=$(/usr/local/git/bin/git --work-tree="${PROJECT_DIR}" show --abbrev-commit | grep "^commit") | |
/usr/libexec/PlistBuddy -c "Add :CFBundleCommit string $buildCommit" $buildPlist | |
if [ $? != 0 ] | |
then | |
/usr/libexec/PlistBuddy -c "Set :CFBundleCommit $buildCommit" $buildPlist | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment