summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-verify-tag-script9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-verify-tag-script b/git-verify-tag-script
new file mode 100755
index 0000000..c499211
--- /dev/null
+++ b/git-verify-tag-script
@@ -0,0 +1,9 @@
+#!/bin/sh
+GIT_DIR=${GIT_DIR:-.git}
+
+tag=$1
+[ -f "$GIT_DIR/refs/tags/$tag" ] && tag=$(cat "$GIT_DIR/refs/tags/$tag")
+
+git-cat-file tag $tag > .tmp-vtag || exit 1
+cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag -
+rm -f .tmp-vtag