Skip to content

Instantly share code, notes, and snippets.

@waynezhang
Created September 9, 2011 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waynezhang/1205502 to your computer and use it in GitHub Desktop.
Save waynezhang/1205502 to your computer and use it in GitHub Desktop.
Add git tag info to Xcode build automatically
version=`git describe --tag`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $version" $PRODUCT_SETTINGS_PATH
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" $PRODUCT_SETTINGS_PATH
@waynezhang
Copy link
Author

add this to build phase in Xcode

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