about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-23 19:40:21 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-23 19:40:21 +0200
commit5d99bfdd676c0b77ac9f874af90100f993c9a50e (patch)
treedb15a0d821bfb8c1102ea1103a3f22046812cc43 /GNUmakefile
parent9bb5795d1d8ce5f1525c99255d628baf9cf51d90 (diff)
downloadmblaze-5d99bfdd676c0b77ac9f874af90100f993c9a50e.tar.gz
mblaze-5d99bfdd676c0b77ac9f874af90100f993c9a50e.tar.xz
mblaze-5d99bfdd676c0b77ac9f874af90100f993c9a50e.zip
GNUmakefile: add release and sign targets
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index b0e1814..42ff83e 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -36,7 +36,7 @@ mmime : slurp.o
 
 museragent: FRC
 	@printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s (%s)\\n"\n' \
-		"$$(git describe --always --dirty 2>/dev/null || cat VERSION)" \
+		"$$(git describe --always --dirty 2>/dev/null | sed 's/^v//' || cat VERSION)" \
 		"$$(date +%Y-%m-%d)" >$@
 	@chmod +x $@
 
@@ -62,4 +62,14 @@ install: FRC all
 	install -m0644 man/*.5 $(DESTDIR)$(MANDIR)/man5
 	install -m0644 man/*.7 $(DESTDIR)$(MANDIR)/man7
 
+release:
+	VERSION=$$(git describe --tags | sed 's/^v//;s/-[^.]*$$//') && \
+	git archive --prefix=mblaze-$$VERSION/ -o mblaze-$$VERSION.tar.gz HEAD
+
+sign:
+	VERSION=$$(git describe --tags | sed 's/^v//;s/-[^.]*$$//') && \
+	gpg --armor --detach-sign mblaze-$$VERSION.tar.gz && \
+	signify -S -s ~/.signify/mblaze.sec -m mblaze-$$VERSION.tar.gz && \
+	sed -i '1cuntrusted comment: verify with mblaze.pub' mblaze-$$VERSION.tar.gz.sig
+
 FRC: