Skip to content

Instantly share code, notes, and snippets.

@rsobik
Created November 11, 2012 11:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rsobik/4054568 to your computer and use it in GitHub Desktop.
Save rsobik/4054568 to your computer and use it in GitHub Desktop.
Update CFBundleShortVersionString String
# Use Xcode's copy of the Git binary
GIT=`xcrun -find git`
## Use the last annotated tag as CFBundleShortVersionString
GIT_TAG=`${GIT} describe --tags`
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${GIT_TAG}" "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
@rsobik
Copy link
Author

rsobik commented Nov 11, 2012

Append a "Run Script" build phase to the application's target. The script shall contain the shell script shown above.

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