From 0dfeaff6079558c39081c2c078c41369da01903b Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 22 Feb 2022 22:32:58 -0500 Subject: make: Add target to create tar signature for cgit This command is modified from an example in the "Signatures" section of cgitrc(5). --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 85347e9..9a86456 100644 --- a/Makefile +++ b/Makefile @@ -28,3 +28,12 @@ $(AUTOLOADS_FILE): $(els) .PHONY: clean clean: $(RM) $(elcs) $(AUTOLOADS_FILE) + +.PHONY: sign-tar +sign-tar: + tag="$$(git describe --abbrev=0)"; \ + object=$$(git archive --format tar \ + --prefix "snakemake-mode-$${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