Created
November 14, 2017 09:33
-
-
Save nomadmonad/2ed50bd2452d246e48a5ad728854ff2a to your computer and use it in GitHub Desktop.
PlistBuddyでInfo.plistのVersionやBuildを更新する ref: https://qiita.com/nomadmonad/items/717f1e3342315c9190ff
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 | |
PATH=/usr/libexec:$PATH | |
if [ $ACTION = "build" ]; then | |
exit 0 | |
fi | |
buildNumber=$(PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}") | |
buildNumber=$(($buildNumber + 1)) | |
PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${INFOPLIST_FILE}" | |
versionNumber=$(PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE}") | |
versionNumber=$(($versionNumber + 1)) | |
PlistBuddy -c "Set :CFBundleShortVersionString $versionNumber" "${INFOPLIST_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment