Created
February 13, 2010 15:52
-
-
Save jjthrash/303509 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -e | |
if [ -x /usr/local/bin/git ]; then | |
export GIT=/usr/local/bin/git | |
elif [ -x /usr/bin/git ]; then | |
export GIT=/usr/bin/git | |
else | |
exit 0 | |
fi | |
export VERSION=`$GIT rev-parse HEAD` | |
echo Setting version number to 1.0-$VERSION | |
/usr/libexec/PlistBuddy "$TARGET_BUILD_DIR/$INFOPLIST_PATH" -c "Set CFBundleVersion 1.0-$VERSION" | |
plutil -convert binary1 "$TARGET_BUILD_DIR/$INFOPLIST_PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment