Last active
November 11, 2019 12:28
-
-
Save devxoul/70838c6057cbead3dfdb to your computer and use it in GitHub Desktop.
Replace git tags to semantic version
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 | |
# Replace git tags to semantic version | |
# e.g. v1.0.0 -> 1.0.0 | |
for vtag in $(git tag -l | awk '$0 ~ /^v/') | |
do | |
tag=$(echo $vtag | sed -e 's/^v//') | |
git tag $tag $vtag | |
git tag -d $vtag | |
git push origin :refs/tags/v$tag | |
done | |
git push --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A ruby script that removes all tags with 'v' prefix (both local and remote)