Skip to content

Instantly share code, notes, and snippets.

@reddavis
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save reddavis/51f877db619bc603aa7e to your computer and use it in GitHub Desktop.

Select an option

Save reddavis/51f877db619bc603aa7e to your computer and use it in GitHub Desktop.
#if [ ${CONFIGURATION} == "Release" ]; then
buildNumber=$(git rev-list --count HEAD)
gitHash=$(git rev-parse --short HEAD)
dsyminfo="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app.dSYM/Contents/info.plist"
/usr/libexec/PlistBuddy -c "Set :GITHash $gitHash" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${dsyminfo}"
#fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment