Skip to content

Instantly share code, notes, and snippets.

@trinadhkoya
Last active September 10, 2019 09:02
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 trinadhkoya/aa30980782ad363587073105a7635064 to your computer and use it in GitHub Desktop.
Save trinadhkoya/aa30980782ad363587073105a7635064 to your computer and use it in GitHub Desktop.
#Update build number with number of git commits if in release mode
if [ ${CONFIGURATION} == "Release" ]; then
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ')
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment