Created
September 8, 2017 00:28
-
-
Save orgmir/dbe98a80c715fb3792aa1b0e34dfd64d 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleVersion</key> | |
<string>31</string> | |
</dict> | |
</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
#!/bin/sh | |
BUILD_NUMBER_PLIST="BuildNumber.plist" | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/$BUILD_NUMBER_PLIST") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/$BUILD_NUMBER_PLIST" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a "Run Script" in XCode Build Phases and add the
increment-build-number.sh
to it.