Last active
September 23, 2015 13:20
-
-
Save funky-monkey/4b930432bab530a23bfb to your computer and use it in GitHub Desktop.
Updating Settings.bundle/Root.plist with version information. Don't forget to update the name of your App-Info.plist
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
GIT_COMMIT_NUM=`git log --pretty=format:'' | wc -l | tr -d ' '` | |
SPRINT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' 'App-Info.plist'` | |
echo "Updating the build number: $GIT_COMMIT_NUM" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $GIT_COMMIT_NUM" "App-Info.plistt" | |
echo "Updating the version in Settings.plist: $SPRINT_VERSION" | |
echo "Updating the build in Settings.plist: $GIT_COMMIT_NUM" | |
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:0:DefaultValue $SPRINT_VERSION" "Settings/Settings.bundle/Root.plist" | |
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:1:DefaultValue $GIT_COMMIT_NUM" "Settings/Settings.bundle/Root.plist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment