From 211133fa0dde4f4cc5b0276627cfb4a18d8b8004 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 22 Jan 2021 13:33:55 -0300 Subject: Makefile: Add missing $(VERSION), $(DATE), and dist target to control them --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8cc3420..71865a0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ .POSIX: PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man +VERSION = v0.1.0 +DATE = 2021-01-22 all: @@ -27,6 +29,19 @@ uninstall: check: sh tests/all.sh +dist: + if git show $(VERSION) 1>/dev/null 2>/dev/null; then \ + echo 'Version $(VERSION) already exists.'; \ + exit 1; \ + fi + + if [ '$(DATE)' != "$$(git log -1 --format=%cd --date=short HEAD)" ]; then \ + echo 'Date $(DATE) is not up-to-date.'; \ + exit 1; \ + fi + + git tag $(VERSION) + NAME = remembering public: sh build-aux/workflow/TODOs.sh $(NAME) $(NAME) public-inbox @@ -35,4 +50,4 @@ public: clean: rm -rf public/ -.PHONY: all clean check install uninstall +.PHONY: all clean check dist install uninstall -- cgit v1.2.3