Skip to content

Instantly share code, notes, and snippets.

@onevcat
Last active April 15, 2016 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save onevcat/ada363480107e71294d9 to your computer and use it in GitHub Desktop.
Save onevcat/ada363480107e71294d9 to your computer and use it in GitHub Desktop.
Update build version by the commit count in git
git=`sh /etc/profile; which git`
appBuild=`"$git" rev-list --all |wc -l`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $appBuild" "${SRCROOT}/${INFOPLIST_FILE}"
echo "Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment