Skip to content

Instantly share code, notes, and snippets.

@jacobvanorder
Forked from iamcam/BuildPhase1.sh
Last active August 29, 2015 14:22
Show Gist options
  • Save jacobvanorder/037c51661d584bb111c3 to your computer and use it in GitHub Desktop.
Save jacobvanorder/037c51661d584bb111c3 to your computer and use it in GitHub Desktop.
if [ "${CONFIGURATION}" = "Release" ]; then
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}")
CFBundleVersion=$(($CFBundleVersion + 1))
echo $CFBundleVersion
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$buildPlist"
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "$INFOPLIST_FILE"
$PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${DWARF_DSYM_FOLDER_PATH}/${WRAPPER_NAME}.dSYM/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${PROJECT_DIR}/${TARGET_NAME}/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${PROJECT_DIR}/${TARGET_NAME} Watch App/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${PROJECT_DIR}/${TARGET_NAME} WatchKit Extension/Info.plist"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment