From 7fecfa8a38029de3c0148820a312bcf3d0459db7 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 19 Jan 2022 09:19:14 -0300 Subject: aux/: Update --- aux/lib.sh | 2 +- aux/workflow/assert-readme.sh | 2 +- aux/workflow/assert-todos.sh | 12 ++++++++---- aux/workflow/dist.sh | 15 ++++++++++++++- aux/workflow/preamble.md | 2 ++ 5 files changed, 26 insertions(+), 7 deletions(-) (limited to 'aux') diff --git a/aux/lib.sh b/aux/lib.sh index d64409a..b47812d 100755 --- a/aux/lib.sh +++ b/aux/lib.sh @@ -8,7 +8,7 @@ uuid() { # Taken from: # https://serverfault.com/a/799198 od -xN20 /dev/urandom | - head -1 | + head -n1 | awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}' } diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh index 7afeb4c..0a85221 100755 --- a/aux/workflow/assert-readme.sh +++ b/aux/workflow/assert-readme.sh @@ -98,7 +98,7 @@ The code is licensed under [GNU Affero General Public License v3.0 or later][AGPL-3.0-or-later] (AGPL-3.0-or-later). -[AGPL-3.0-or-later]: https://euandreh.xyz/.git$PROJECT/tree/COPYING +[AGPL-3.0-or-later]: https://euandreh.xyz/$PROJECT.git/tree/COPYING EOF if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then diff --git a/aux/workflow/assert-todos.sh b/aux/workflow/assert-todos.sh index bc4907d..11db142 100755 --- a/aux/workflow/assert-todos.sh +++ b/aux/workflow/assert-todos.sh @@ -1,10 +1,14 @@ #!/bin/sh set -eu -if [ -e .git ] && git grep FIXME | grep -v '^TODOs.md' | - grep -v '^aux/workflow/assert-todos.sh'; then - echo "Found dangling FIXME markers on the project." - echo "You should write them down properly on TODOs.md." +# shellcheck disable=2086 +if [ -e .git ] && + git grep FIXME ${1:-} | + grep -v '^TODOs.md:' | + grep -v '^aux/workflow/assert-todos.sh:' +then + echo "Found dangling FIXME markers on the project." >&2 + echo "You should write them down properly on TODOs.md." >&2 exit 1 fi diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh index a433478..48a9d57 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 +if [ "v$(awk '/^VERSION *=/{print $3; exit}' Makefile)" != "$VVERSION" ]; then + echo "Version '$VVERSION' mismatch with \$(VERSION) in Makefile." >&2 + echo 'Make sure to invoke this script with "make dist".' >&2 + exit 1 +fi + if ! printf '%s\n%s\n' "$(git tag)" "$VVERSION" | sort -nct. -k1 -k2 -k3; then echo 'New tag is not bigger than existing ones.' >&2 exit 1 @@ -63,12 +69,19 @@ if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then exit 1 fi +if [ "$(awk '/^DATE *=/{print $3; exit}' Makefile)" != "$DATE" ]; then + echo "Date '$DATE' mismatch with \$(DATE) in Makefile." >&2 + echo 'Make sure to invoke this script with "make dist".' >&2 + exit 1 +fi + if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then echo "Commit message isn't 'Release $VVERSION'." >&2 exit 1 fi -make clean public dev-check EXTRA_VERSION="$VVERSION" +make clean +make dev-check EXTRA_VERSION="$VVERSION" if ! (git diff --quiet && git diff --quiet --staged); then echo 'Dirty repository.' diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md index ee32d58..a699d04 100644 --- a/aux/workflow/preamble.md +++ b/aux/workflow/preamble.md @@ -12,3 +12,5 @@ and see [existing discussions](https://lists.sr.ht/~euandreh/@MAILING_LIST@?sear *Vi povas ankaŭ skribi esperante*. +*Tu también puedes escribir en español*. + -- cgit v1.2.3