Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # if you use exclusively lightweigth tags :
- git show-refs --tags | grep $(git rev-parse HEAD)
- # also check that the tag looks like a build tag, e.g : refs/tags/1.2.3.4
- | grep "refs/tags/[1-9.]*$"
- # if you use annotated tags :
- git show-refs --tags --dereference | grep $(git rev-parse HEAD)
- # the grepped line may look like : refs/tags/1.2.3.4^{}
- | grep -E "refs/tags/[1-9.]*(^{})?$"
Add Comment
Please, Sign In to add comment