Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goodmorningcody/7b1340322ddcf3cdbb3890c46ea69916 to your computer and use it in GitHub Desktop.
Save goodmorningcody/7b1340322ddcf3cdbb3890c46ea69916 to your computer and use it in GitHub Desktop.
Xcode Automate Versioning Script with Git Revision Head
revisionString="$(git rev-parse HEAD)"
versionString="${revisionString:0:7}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $versionString" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment