Skip to content

Instantly share code, notes, and snippets.

@smokyonion
Created March 7, 2014 20:01
Show Gist options
  • Save smokyonion/9418843 to your computer and use it in GitHub Desktop.
Save smokyonion/9418843 to your computer and use it in GitHub Desktop.
Xcode Git Version Script
git_version=$(git log -1 --format="%h")
info_plist="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${git_version}'" "${info_plist}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment