Skip to content

Instantly share code, notes, and snippets.

@sandfox
Created April 12, 2017 16:42
Show Gist options
  • Select an option

  • Save sandfox/8bcac1e35d4c4b06fdb7530738445860 to your computer and use it in GitHub Desktop.

Select an option

Save sandfox/8bcac1e35d4c4b06fdb7530738445860 to your computer and use it in GitHub Desktop.
get latest tag
#! /usr/bin/env sh
git tag | grep "^release/r\([0-9]\+\.[0-9]\+\.[0-9]\+\)$" | sed -e "s/release\/r//g" | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment