aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-08-28 09:06:06 -0300
committerEuAndreh <eu@euandre.org>2021-08-28 09:06:06 -0300
commitc7a6180dc74ea7b25f571cb07540fea816f3c9f5 (patch)
treee3c2a41e0392e8e458e9edff45f6cd5aa33840f9
parentaux/workflow/dist.sh: Add prompt to automatically run publishing commands (diff)
downloadgit-permalink-c7a6180dc74ea7b25f571cb07540fea816f3c9f5.tar.gz
git-permalink-c7a6180dc74ea7b25f571cb07540fea816f3c9f5.tar.xz
aux/workflow/dist.sh: Enforce ascending order of tag numbers
-rwxr-xr-xaux/workflow/dist.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index e5971b8..cab9ff3 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
+TAG_LIST="$(printf '%s\n%s\n' "$(git tag)" "$VVERSION")"
+if [ "$TAG_LIST" != "$(echo "$TAG_LIST" | sort -t. -n -k1 -k2 -k3)" ]; then
+ echo 'New tag is not bigger than existing ones.' >&2
+ exit 1
+fi
+
sh aux/workflow/assert-changelog.sh -N "$PROJECT_UC" -n "$PROJECT" "$VVERSION"
sh aux/workflow/assert-readme.sh -n "$PROJECT" -m "$MAILING_LIST" "$VVERSION"
@@ -71,8 +77,8 @@ if ! (git diff --quiet && git diff --quiet --staged); then
exit 1
fi
-git tag "$VVERSION"
+git tag "$VVERSION"
sh aux/workflow/sign-tarballs.sh -n "$PROJECT"