From e6510c83a2146436778fbd905bf6597eb187ca4f Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 26 Jun 2021 18:15:33 -0300 Subject: Makefile, README.md: Adapt to changes in aux/ --- aux/assert-shellcheck.sh | 2 +- aux/ci/ci-build.sh | 6 +-- aux/ci/git-post-receive.sh | 6 +-- aux/ci/git-pre-push.sh | 6 +-- aux/ci/report.sh | 11 ++-- aux/guix/with-container.sh | 2 +- aux/tests-lib.sh | 8 +++ aux/workflow/TODOs.sh | 5 +- aux/workflow/assert-changelog.sh | 3 +- aux/workflow/assert-manpages.sh | 6 ++- aux/workflow/assert-readme.sh | 7 +-- aux/workflow/assert-spelling.sh | 0 aux/workflow/commonmark.sh | 7 ++- aux/workflow/dist.sh | 10 ++++ aux/workflow/l10n.sh | 50 +++++++++++++++++ aux/workflow/manpages.sh | 113 +++++++++++++++++++++------------------ aux/workflow/public.sh | 13 +++-- 17 files changed, 168 insertions(+), 87 deletions(-) create mode 100644 aux/workflow/assert-spelling.sh create mode 100755 aux/workflow/l10n.sh (limited to 'aux') diff --git a/aux/assert-shellcheck.sh b/aux/assert-shellcheck.sh index cc01f3a..1779ea8 100755 --- a/aux/assert-shellcheck.sh +++ b/aux/assert-shellcheck.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -eux +set -eu git ls-files | \ xargs awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \ diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh index 60af813..7fa3382 100755 --- a/aux/ci/ci-build.sh +++ b/aux/ci/ci-build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eux -PACKAGE="$1" +PROJECT="$1" LOGS_DIR="$2" read -r _ SHA _ # oldrev newrev refname FILENAME="$(date -Is)-$SHA.log" @@ -26,8 +26,8 @@ EOF git notes append -m "$NOTE" cd - - sh aux/ci/report.sh "$PACKAGE" - rsync -av public/ "/srv/http/$PACKAGE/" --delete + sh aux/ci/report.sh "$PROJECT" public + rsync -av public/ "/srv/http/$PROJECT/" --delete printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s" "$STATUS" } diff --git a/aux/ci/git-post-receive.sh b/aux/ci/git-post-receive.sh index ee8075f..167ac4a 100755 --- a/aux/ci/git-post-receive.sh +++ b/aux/ci/git-post-receive.sh @@ -9,6 +9,6 @@ for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do fi done -PACKAGE="$(basename "$PWD" | cut -d. -f1)" # remove .git suffix -LOGS_DIR="/opt/ci/$PACKAGE/logs" -"/opt/ci/$PACKAGE/ci-build.sh" "$PACKAGE" "$LOGS_DIR" +PROJECT="$(basename "$PWD" | cut -d. -f1)" # remove .git suffix +LOGS_DIR="/opt/ci/$PROJECT/logs" +"/opt/ci/$PROJECT/ci-build.sh" "$PROJECT" "$LOGS_DIR" diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh index e73b9b8..cccd6e5 100755 --- a/aux/ci/git-pre-push.sh +++ b/aux/ci/git-pre-push.sh @@ -3,9 +3,9 @@ set -eux TLD="$(cat aux/tld.txt)" -PACKAGE="$(basename "$PWD")" -LOGS_DIR="/opt/ci/$PACKAGE/logs" -REMOTE_GIT_DIR="/srv/git/$PACKAGE.git" +PROJECT="$(basename "$PWD")" +LOGS_DIR="/opt/ci/$PROJECT/logs" +REMOTE_GIT_DIR="/srv/git/$PROJECT.git" DESCRIPTION="$(mktemp)" if [ -f description ] diff --git a/aux/ci/report.sh b/aux/ci/report.sh index e71e1ac..c873f54 100755 --- a/aux/ci/report.sh +++ b/aux/ci/report.sh @@ -2,12 +2,13 @@ set -eu PROJECT="$1" +OUTDIR="$2" TLD="$(cat aux/tld.txt)" PASS='✅' FAIL='❌' -mkdir -p public/ci-logs public/ci-data +mkdir -p "$OUTDIR/ci-logs" "$OUTDIR/ci-data" OUT="$(mktemp)" chmod 644 "$OUT" @@ -20,8 +21,8 @@ wait for c in $(git notes list | cut -d\ -f2); do DATA="$(git notes --ref=refs/notes/ci-data show "$c")" FILENAME="$(echo "$DATA" | cut -d\ -f2)" - echo "$DATA" > "public/ci-data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" > "public/ci-logs/$FILENAME" + echo "$DATA" > "$OUTDIR/ci-data/$FILENAME" + git notes --ref=refs/notes/ci-logs show "$c" > "$OUTDIR/ci-logs/$FILENAME" done cat <> "$OUT" @@ -46,7 +47,7 @@ cat <> "$OUT"