Created
September 4, 2018 07:44
-
-
Save burnedikt/f9e7c4929ba5a1a6bd0aceb3a4774d78 to your computer and use it in GitHub Desktop.
Find out semantic version from (annotated) git tag via powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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