Skip to content

Instantly share code, notes, and snippets.

@vinzenzweber
Created January 16, 2012 08:45
Show Gist options
  • Save vinzenzweber/1619781 to your computer and use it in GitHub Desktop.
Save vinzenzweber/1619781 to your computer and use it in GitHub Desktop.
Get the latest git tag and git commit count for automated build scripts.
git=`which git`
gittag=`git describe --abbrev=0 --tags` #`$git describe --tags --always`
gitcount=`$git rev-list --all | wc -l | tr -cd '[[:digit:]]'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment