diff options
author | EuAndreh <eu@euandre.org> | 2021-09-01 11:18:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-09-01 11:18:01 -0300 |
commit | 692185136a6d7e96660b90370759d1f83a05ec4c (patch) | |
tree | 34852b497fd9054ab55ff27045efd4a19dd9f331 /aux/workflow/assert-changelog.sh | |
parent | src/remembering.c: Enforce C style (diff) | |
download | remembering-692185136a6d7e96660b90370759d1f83a05ec4c.tar.gz remembering-692185136a6d7e96660b90370759d1f83a05ec4c.tar.xz |
aux/: Update
Diffstat (limited to 'aux/workflow/assert-changelog.sh')
-rwxr-xr-x | aux/workflow/assert-changelog.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh index 7f9117f..4acc81b 100755 --- a/aux/workflow/assert-changelog.sh +++ b/aux/workflow/assert-changelog.sh @@ -43,18 +43,21 @@ assert() { DATE="$1" VVERSION="$2" VERSION="${2#v}" - CHANGELOG_ENTRY="# [$VERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) - $DATE" - + CHANGELOG_ENTRY="$(printf \ + '# [%s](https://git.euandreh.xyz/%s/commit/?id=%s) - %s' \ + "$VERSION" "$PROJECT" "$VVERSION" "$DATE")" if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then echo "Missing '$CHANGELOG_ENTRY' entry from CHANGELOG.md" >&2 exit 1 fi } -for VVERSION in $(git tag); do - DATE="$(git log -1 --format=%cd --date=short "$VVERSION")" - assert "$DATE" "$VVERSION" -done +if [ -e .git ]; then + for VVERSION in $(git tag); do + DATE="$(git log -1 --format=%cd --date=short "$VVERSION")" + assert "$DATE" "$VVERSION" + done +fi # "$@" represents a list of tags to be also included in the verification. for VVERSION in "$@"; do |