aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-22 13:33:55 -0300
committerEuAndreh <eu@euandre.org>2021-01-22 13:35:52 -0300
commit211133fa0dde4f4cc5b0276627cfb4a18d8b8004 (patch)
treee90132c1edd9f7f38f5a5b25356d9cbe95fb1675
parentMakefile: Add .PHONY marker to targets (diff)
downloadremembering-211133fa0dde4f4cc5b0276627cfb4a18d8b8004.tar.gz
remembering-211133fa0dde4f4cc5b0276627cfb4a18d8b8004.tar.xz
Makefile: Add missing $(VERSION), $(DATE), and dist target to control them
-rw-r--r--Makefile17
1 files changed, 16 insertions, 1 deletions
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