aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in12
-rwxr-xr-xaux/workflow/dist.sh17
2 files changed, 18 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in
index df8b2b9..fd25312 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -55,17 +55,7 @@ dev-check: all fallible-tests
sh aux/workflow/assert-todos.sh
dist:
- if git show v$(VERSION) 1>/dev/null 2>/dev/null; then \
- echo 'Version v$(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 v$(VERSION)
+ sh aux/workflow/dist.sh $(DATE) $(VERSION)
clean:
rm -rf public/ tests/test-profiles/ remembering remembering-c run-tests fallible* vgcore*
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
new file mode 100755
index 0000000..bc01a8f
--- /dev/null
+++ b/aux/workflow/dist.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+DATE="$1"
+VERSION="v$2"
+
+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"