aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-02-28 17:22:32 -0300
committerEuAndreh <eu@euandre.org>2021-02-28 17:22:32 -0300
commit9577603ed88821593fa68001ce7672173af8e98f (patch)
treebd61195823549ed4b6a7113967fec394388e84f4 /aux/workflow
parentfake-symlinks: README.sh: Reverse list of tags (diff)
downloaddotfiles-9577603ed88821593fa68001ce7672173af8e98f.tar.gz
dotfiles-9577603ed88821593fa68001ce7672173af8e98f.tar.xz
fake-symlinks: Add assert-changelog.sh, adapt other files accordingly
Diffstat (limited to 'aux/workflow')
-rwxr-xr-xaux/workflow/assert-changelog.sh13
-rwxr-xr-xaux/workflow/dist.sh5
2 files changed, 14 insertions, 4 deletions
diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh
new file mode 100755
index 00000000..981ff9dc
--- /dev/null
+++ b/aux/workflow/assert-changelog.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eu
+
+DATE="$1"
+VERSION="$2"
+VVERSION="v$2"
+PROJECT="$3"
+
+CHANGELOG_ENTRY="# [$VERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) - $DATE"
+if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then
+ echo "Missing '$CHANGELOG_REGEX' entry from CHANGELOG.md" >&2
+ exit 1
+fi
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index b337ef0a..afe2c92e 100755
--- a/aux/workflow/dist.sh
+++ b/aux/workflow/dist.sh
@@ -16,10 +16,7 @@ if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then
exit 1
fi
-if ! grep -q "^# $VERSION - $DATE$" CHANGELOG.md; then
- echo "Missing '# $VERSION - $DATE' entry from CHANGELOG.md" >&2
- exit 1
-fi
+sh aux/workflow/assert-changelog.sh "$DATE" "$VERSION" "$PROJECT"
git tag "$VVERSION"