Created
March 16, 2013 14:17
-
-
Save clupprich/5176572 to your computer and use it in GitHub Desktop.
git tag for semantic versions
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
#!/bin/bash | |
# Sorts the output of `git-tag` correctly for version string like v1.2.3.4. | |
# Save this file somewhere in your bin path and execute with git tag-semantic | |
semantic_tags=$(git tag | sort -n -t. -k1,1 -k2,2 -k3,3 -k4,4) | |
echo "$semantic_tags" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment