aboutsummaryrefslogtreecommitdiff
path: root/git-check-tag
diff options
context:
space:
mode:
Diffstat (limited to 'git-check-tag')
-rwxr-xr-xgit-check-tag8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-check-tag b/git-check-tag
index 99d67da..ca9fc6b 100755
--- a/git-check-tag
+++ b/git-check-tag
@@ -9,5 +9,9 @@ BASENAME="`basename $0`"
# Get the latest tag
tag="`git describe --abbrev=0 --tags`"
-# Check it
-git tag -v $tag
+# Check or checkout it
+if [ "$BASENAME" == "git-check-tag" ]; then
+ git tag -v $tag
+elif [ "$BASENAME" == "git-checkout-tag" ]; then
+ git checkout $tag
+fi