Guest User

Untitled

a guest
Oct 23rd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # if you use exclusively lightweigth tags :
  2. git show-refs --tags | grep $(git rev-parse HEAD)
  3. # also check that the tag looks like a build tag, e.g : refs/tags/1.2.3.4
  4. | grep "refs/tags/[1-9.]*$"
  5.  
  6. # if you use annotated tags :
  7. git show-refs --tags --dereference | grep $(git rev-parse HEAD)
  8. # the grepped line may look like : refs/tags/1.2.3.4^{}
  9. | grep -E "refs/tags/[1-9.]*(^{})?$"
Add Comment
Please, Sign In to add comment