Skip to content

Instantly share code, notes, and snippets.

@tjhanley
Created February 23, 2011 21:55
Show Gist options
  • Save tjhanley/841273 to your computer and use it in GitHub Desktop.
Save tjhanley/841273 to your computer and use it in GitHub Desktop.
command line utility to write the version number and the git commit hash to your projects Bundle Version Id
#!/usr/bin/env bash
# place this in your path somewhere
# usage xcodeversionr.sh 1.0.1 MyProject-Info.plist
echo "Version: $1"
echo "File: $2"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $1 (build `git rev-parse --short HEAD`)" $2
@tjhanley
Copy link
Author

next version will have the version number auto-increment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment