summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-12-22 10:12:21 +0100
committerTobias Klauser <tklauser@distanz.ch>2016-12-22 14:36:47 +0100
commit34c1b4cc87ea990ea262694cdf8ee681bfdef6d2 (patch)
tree69aec1746fd486eec022bdfe603c7a9cf9f3de17
parent0a2f068a48e85f3f0e7b4cb29036e003e51cfa88 (diff)
build: Add release target
Add a release target to the Makefile (akin to the one from netsniff-ng) in order to streamline the release process. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6c87f7a..16752fc 100644
--- a/Makefile
+++ b/Makefile
@@ -72,3 +72,18 @@ clean:
@echo " CLEAN"
@rm -f $(D_OBJS) $(D_P)
@rm -f $(Q_OBJS) $(Q_P)
+
+# Maintainer targets
+
+GIT_TAG = git tag -a v$(VERSION) -s -m "llmnrd $(VERSION) release"
+GIT_ARCHIVE = git archive --prefix=llmnrd-$(VERSION)/ v$(VERSION) | \
+ $(1) -9 > ../llmnrd-$(VERSION).tar.$(2)
+GPG_SIGN = gpg -a --output ../llmnrd-$(VERSION).tar.$(1).asc --detach-sig \
+ ../llmnrd-$(VERSION).tar.$(1)
+release:
+ $(GIT_TAG)
+ $(call GIT_ARCHIVE,gzip,gz)
+ $(call GIT_ARCHIVE,bzip2,bz2)
+ $(call GPG_SIGN,gz)
+ $(call GPG_SIGN,bz2)
+ $(Q)echo "Created release $(VERSION)"