aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2022-02-22 22:32:58 -0500
committerKyle Meyer <kyle@kyleam.com>2022-02-22 22:32:58 -0500
commit0dfeaff6079558c39081c2c078c41369da01903b (patch)
tree5bb2549c2a47ae9f68fa6f06ba7b9a5e4feabb29 /Makefile
parent78abd82f34a71b3fff7aa869de1b07a082f1f351 (diff)
downloadsnakemake-mode-0dfeaff6079558c39081c2c078c41369da01903b.tar.gz
make: Add target to create tar signature for cgit
This command is modified from an example in the "Signatures" section of cgitrc(5).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
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"