aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/dist.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-16 16:33:41 -0300
committerEuAndreh <eu@euandre.org>2022-01-16 16:33:41 -0300
commit3167c2737d6a2282641a5f88a66c92062c39caa4 (patch)
tree318c55d964dd49208a139d0bc7ff0ad0e32f50a1 /aux/workflow/dist.sh
parentMakefile.dynamic: add (diff)
downloadeuandre.org-3167c2737d6a2282641a5f88a66c92062c39caa4.tar.gz
euandre.org-3167c2737d6a2282641a5f88a66c92062c39caa4.tar.xz
aux/: Update
Diffstat (limited to 'aux/workflow/dist.sh')
-rwxr-xr-xaux/workflow/dist.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index a433478..48a9d57 100755
--- a/aux/workflow/dist.sh
+++ b/aux/workflow/dist.sh
@@ -53,6 +53,12 @@ if git show "$VVERSION" 1>/dev/null 2>/dev/null; then
exit 1
fi
+if [ "v$(awk '/^VERSION *=/{print $3; exit}' Makefile)" != "$VVERSION" ]; then
+ echo "Version '$VVERSION' mismatch with \$(VERSION) in Makefile." >&2
+ echo 'Make sure to invoke this script with "make dist".' >&2
+ exit 1
+fi
+
if ! printf '%s\n%s\n' "$(git tag)" "$VVERSION" | sort -nct. -k1 -k2 -k3; then
echo 'New tag is not bigger than existing ones.' >&2
exit 1
@@ -63,12 +69,19 @@ if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then
exit 1
fi
+if [ "$(awk '/^DATE *=/{print $3; exit}' Makefile)" != "$DATE" ]; then
+ echo "Date '$DATE' mismatch with \$(DATE) in Makefile." >&2
+ echo 'Make sure to invoke this script with "make dist".' >&2
+ exit 1
+fi
+
if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then
echo "Commit message isn't 'Release $VVERSION'." >&2
exit 1
fi
-make clean public dev-check EXTRA_VERSION="$VVERSION"
+make clean
+make dev-check EXTRA_VERSION="$VVERSION"
if ! (git diff --quiet && git diff --quiet --staged); then
echo 'Dirty repository.'