aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/assert-changelog.sh
blob: d39f5273701143be6ce0cb54803f51e91bc939cd (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -eu

PROJECT="$1"

for VVERSION in $(git tag); do
  VERSION="${VVERSION#v}"
  DATE="$(git log -1 --format=%cd --date=short "$VVERSION")"
  CHANGELOG_ENTRY="# [$VERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) - $DATE"
  if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then
    echo "Missing '$CHANGELOG_ENTRY' entry from CHANGELOG.md" >&2
    exit 1
  fi
done