Created
December 9, 2014 19:44
-
-
Save philipcristiano/3d306c0fd054934152ad to your computer and use it in GitHub Desktop.
Python semver from git tag for PBR
This file contains hidden or 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
if git describe --exact-match 2> /dev/null; then | |
VERSION=$(git describe) | |
else | |
VERSION=$(git describe | sed -E 's/([0-9]+)\.([0-9]+)-([0-9]+).*/\1.\2.\3/') | |
git tag -a "$VERSION" -m "Tagging version \"${VERSION}\"" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment