aboutsummaryrefslogblamecommitdiff
path: root/aux/workflow/assert-changelog.sh
blob: 8e81f1f4b9b7b60a7ccf5016d789eb387f3aa467 (plain) (tree)
1
2
3
4
5
6





                              






                                                                                                      
    
#!/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