Skip to content

Instantly share code, notes, and snippets.

@strzempa
Created November 14, 2019 11:42
Show Gist options
  • Save strzempa/7d39a6cbdcb081fb846b8afc7c2de769 to your computer and use it in GitHub Desktop.
Save strzempa/7d39a6cbdcb081fb846b8afc7c2de769 to your computer and use it in GitHub Desktop.
xcode 11 scheme build pre-action to bump version
if [ "${CONFIGURATION}" = "Release" ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c 'print :CFBundleVersion' "${PROJECT_DIR}/${INFOPLIST_FILE}")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $(expr $buildNumber + 1)" "${PROJECT_DIR}/${INFOPLIST_FILE}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment