Skip to content

Instantly share code, notes, and snippets.

@dcloud
Created February 6, 2013 22:08
Show Gist options
  • Save dcloud/4726343 to your computer and use it in GitHub Desktop.
Save dcloud/4726343 to your computer and use it in GitHub Desktop.
My simple version of using git commit count to set build numbers in Xcode.
#!/bin/sh
#
git=`sh /etc/profile; which git`
count=`$git rev-list --all | wc -l`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $count" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment