Skip to content

Instantly share code, notes, and snippets.

@willgarcia
Last active August 29, 2015 13:57
Show Gist options
  • Save willgarcia/109c9427e2f39934f1b3 to your computer and use it in GitHub Desktop.
Save willgarcia/109c9427e2f39934f1b3 to your computer and use it in GitHub Desktop.
last git tag
LAST_TAG=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname)' --count=1)
LAST_VERSION_STABLE=$(echo $LAST_TAG | sed 's/refs\/tags\///g')
echo $LAST_VERSION_STABLE
git describe --tags `git rev-list --tags --max-count=1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment