Skip to content

Instantly share code, notes, and snippets.

@matburt
Forked from seanf/VERSION-GEN
Created January 16, 2012 18:47
Show Gist options
  • Save matburt/1622282 to your computer and use it in GitHub Desktop.
Save matburt/1622282 to your computer and use it in GitHub Desktop.
Generate Git Versions/revisions
#!/bin/bash
VERNAME=`git describe --long | sed "s/-g.*//g"`
VERCODE=`git rev-list --all | wc -l`
# Do something with the verson number here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment