Last active
September 4, 2018 07:44
-
-
Save burnedikt/142e321a965a655a64e134f410b9d4c6 to your computer and use it in GitHub Desktop.
Find out semantic version from (annotated) git tag via bash
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 | |
gitVersion=$(git describe --all --match "v*" --abbrev=0 | cut -c 2-) | |
echo $gitVersion # outputs: 1.2.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment