Created
January 31, 2015 19:12
-
-
Save sarunw/9ba2593d0cb21d553005 to your computer and use it in GitHub Desktop.
Auto increment build number of xcode based on git commit.
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
echo "CONFIG $CONFIGURATION" | |
if [ "$CONFIGURATION" != "Release" ]; then | |
exit 0 | |
fi | |
BUILD_NUMBER=$(git rev-list HEAD --count) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NUMBER" "$INFOPLIST_FILE" | |
# For debugging: | |
echo "BUILD NUMBER: $BUILD_NUMBER" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment