summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2019-09-13 02:13:27 +0200
committerLevente Polyak <anthraxx@archlinux.org>2019-09-28 00:15:56 +0200
commit62a2f118ce84deb9077cf163c45d3b22af741269 (patch)
treec17f7eb1da41fe3a6b7e62358aaea14f1e4d1d40
parent723ad23b4859de69cfdb2b2c7ba9415832b42c58 (diff)
downloaddevtools-62a2f118ce84deb9077cf163c45d3b22af741269.tar.gz
devtools-62a2f118ce84deb9077cf163c45d3b22af741269.tar.xz
make: add target to tag a new version
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d68d763..8d54ed4 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,12 @@ uninstall:
rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile#doc/}; \
done;
+TODAY=$(shell date +"%Y%m%d")
+tag:
+ @sed -E "s|^V=[0-9]{8}|V=$(TODAY)|" -i Makefile
+ @git commit --gpg-sign --message "Version $(TODAY)" Makefile
+ @git tag --sign --message "Version $(TODAY)" $(TODAY)
+
dist:
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
gpg --detach-sign --use-agent devtools-$(V).tar.gz
@@ -138,5 +144,5 @@ upload:
check: $(BINPROGS) bash_completion makepkg-x86_64.conf PKGBUILD.proto
shellcheck $^
-.PHONY: all clean install uninstall dist upload check
+.PHONY: all clean install uninstall dist upload check tag
.DELETE_ON_ERROR: