From 69a1761402b6cd10b93fecbddfbdbd822a1c6cfa Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 10 Dec 2023 21:16:21 -0500 Subject: make: Add target to create tar signature for cgit --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 917cbaa..345dcf0 100644 --- a/Makefile +++ b/Makefile @@ -57,3 +57,11 @@ tests/piem-tests.elc: tests/piem-tests.el piem.elc .texi.html: makeinfo --html --css-ref=manual.css -c TOP_NODE_UP_URL=/ --no-split \ -o $@ $< + +sign-tar: + tag="$$(git describe --abbrev=0)"; \ + object=$$(git archive --format tar \ + --prefix "piem-$${tag#v}/" "$$tag" | \ + gpg --output - --armor --detach-sign | \ + git hash-object -w --stdin); \ + git notes --ref=refs/notes/signatures/tar add -C "$$object" "$$tag" -- cgit v1.2.3