aboutsummaryrefslogtreecommitdiff
path: root/git-check-tag
blob: ca9fc6b50fcfb7b0d1a7b08e7394f9c2359d966b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
#
# Check the latest tag.
#

# Parameters
BASENAME="`basename $0`"

# Get the latest tag
tag="`git describe --abbrev=0 --tags`"

# Check or checkout it
if [ "$BASENAME" == "git-check-tag" ]; then
  git tag -v $tag
elif [ "$BASENAME" == "git-checkout-tag" ]; then
  git checkout $tag
fi