Last active
February 16, 2018 12:37
-
-
Save vtourraine/0f3ba2c1effeea238a7745758a4c147d to your computer and use it in GitHub Desktop.
Run Script: Sync Version and Build Numbers
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
PLISTBUDDY="/usr/libexec/PlistBuddy" | |
MAIN_APP_PLIST_PATH="###/Info.plist" | |
EXTENSIONS_PLIST_PATHS=("###/Info.plist" "###/Info.plist") | |
BUNDLEVERSION=`${PLISTBUDDY} -c "Print :CFBundleVersion" "$MAIN_APP_PLIST_PATH"` | |
BUNDLEVERSIONSTRING=`${PLISTBUDDY} -c "Print :CFBundleShortVersionString" "$MAIN_APP_PLIST_PATH"` | |
for EXTENSIONS_PLIST_PATH in "${EXTENSIONS_PLIST_PATHS[@]}" | |
do | |
${PLISTBUDDY} -c "Set :CFBundleVersion $BUNDLEVERSION" "$EXTENSIONS_PLIST_PATH" | |
${PLISTBUDDY} -c "Set :CFBundleShortVersionString $BUNDLEVERSIONSTRING" "$EXTENSIONS_PLIST_PATH" | |
done | |
echo "Synced version and build numbers: ${BUNDLEVERSIONSTRING} (${BUNDLEVERSION})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment