Created
February 29, 2012 05:42
-
-
Save grandeforesta/1938266 to your computer and use it in GitHub Desktop.
gitのリビジョン番号をplistに自動的に埋め込む by http://sonson.jp/?p=2241
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
#svnやgitのリビジョン,ビルド番号をplistに自動的に埋め込む http://sonson.jp/?p=2241 | |
git_revision=$(git show --format='%h' -s) | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleGitRevision $git_revision" "$INFOPLIST_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment