Skip to content

Instantly share code, notes, and snippets.

@mtrovilho
Last active August 29, 2015 14:02
Show Gist options
  • Save mtrovilho/56cf3f9d792a47ae1637 to your computer and use it in GitHub Desktop.
Save mtrovilho/56cf3f9d792a47ae1637 to your computer and use it in GitHub Desktop.
Xcode build phase to set Bundle Version from git commit
# Run Script Build Phase
BuildPlist=${INFOPLIST_FILE}
CFBundleVersion=$(git rev-parse --short HEAD)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" "${BuildPlist}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment