Skip to content

Instantly share code, notes, and snippets.

@burnedikt
Created September 4, 2018 07:44
Show Gist options
  • Save burnedikt/f9e7c4929ba5a1a6bd0aceb3a4774d78 to your computer and use it in GitHub Desktop.
Save burnedikt/f9e7c4929ba5a1a6bd0aceb3a4774d78 to your computer and use it in GitHub Desktop.
Find out semantic version from (annotated) git tag via powershell
# assuming we've got an existing (annotated) git tag like
# git tag -a v1.2.3
$sdkVersion = (git describe --all --match "v*").Split("-")[0].Replace("tags/", "").Replace("v", "")
Write-Output $gitVersion # outputs: 1.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment