Release preparation.
[open-adventure.git] / Makefile
index 9fa7c861f3e384a717382c286bab0ea22a09bbcc..961332bb38d9b4b71249813c95658130026e6d37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,8 +40,6 @@ database.c database.h: compile adventure.text
        ./compile
        $(CC) $(CCFLAGS) $(DBX) -c database.c
 
-html: index.html advent.html history.html hints.html
-
 clean:
        rm -f *.o advent *.html database.[ch] compile *.gcno *.gcda
        rm -f README advent.6 MANIFEST
@@ -61,15 +59,16 @@ check: advent
        asciidoc $<
 
 # README.adoc exists because that filename is magic on GitLab.
-DOCS=COPYING NEWS README.adoc TODO \
-       advent.adoc history.adoc index.adoc hints.adoc advent.6
-
-# Can't use GNU tar's --transform, needs to build under Alpine Linux
-advent-$(VERS).tar.gz: $(SOURCES) $(DOCS) advent.6
-       @ls $(SOURCES) $(DOCS) advent.1 | sed s:^:advent-$(VERS)/: >MANIFEST
-       @(cd ..; ln -s advent advent-$(VERS))
-       (cd ..; tar -czvf advent/advent-$(VERS).tar.gz `cat advent/MANIFEST`)
-       @(cd ..; rm advent-$(VERS))
+DOCS=COPYING NEWS README.adoc TODO advent.adoc history.adoc hints.adoc advent.6
+
+advent-$(VERS).tar.gz: $(SOURCES) $(DOCS)
+       tar --transform='s:^:advent-$(VERS)/:' --show-transformed-names -cvzf advent-$(VERS).tar.gz $(SOURCES) $(DOCS)
+
+release: advent-$(VERS).tar.gz advent.html history.html hints.html
+       shipper version=$(VERS) | sh -e -x
+
+refresh: advent.html
+       shipper -N -w version=$(VERS) | sh -e -x
 
 dist: advent-$(VERS).tar.gz