aboutsummaryrefslogtreecommitdiff
path: root/aux
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-07 22:55:16 -0300
committerEuAndreh <eu@euandre.org>2021-06-07 22:55:16 -0300
commitf5ec71eadaf1e1479fbb8b5884edc4a87a8d2f63 (patch)
tree525a4ec4d34f5417c623dd24bd855cddee151938 /aux
parentTODOs.md: Mark #task-4686d9a5-3514-e7f2-25de-b3cf66199124 as CANCELLED (diff)
downloadremembering-f5ec71eadaf1e1479fbb8b5884edc4a87a8d2f63.tar.gz
remembering-f5ec71eadaf1e1479fbb8b5884edc4a87a8d2f63.tar.xz
Update files under aux/
Diffstat (limited to 'aux')
-rwxr-xr-xaux/ci/ci-build.sh6
-rwxr-xr-xaux/ci/git-pre-push.sh10
-rw-r--r--aux/tld.txt1
-rwxr-xr-xaux/workflow/TODOs.sh9
-rwxr-xr-xaux/workflow/assert-readme.sh23
-rw-r--r--aux/workflow/preamble.md2
-rwxr-xr-xaux/workflow/public.sh2
7 files changed, 36 insertions, 17 deletions
diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh
index 4214ae2..b6769a9 100755
--- a/aux/ci/ci-build.sh
+++ b/aux/ci/ci-build.sh
@@ -25,6 +25,10 @@ EOF
git notes --ref=refs/notes/ci-logs add -f -F "$LOGFILE"
git notes append -m "$NOTE"
+ cd -
+ sh aux/ci/report.sh "$PACKAGE"
+ rsync -a public/ "/srv/http/$PACKAGE/" --delete
+
printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s" "$STATUS"
}
trap finish EXIT
@@ -45,6 +49,4 @@ EOF
fi
$RUNNER 'make clean public dev-check'
-
- rsync -a public/ "/srv/http/$PACKAGE/" --delete
} 2>&1 | tee "$LOGFILE"
diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh
index 5a7ca0b..e73b9b8 100755
--- a/aux/ci/git-pre-push.sh
+++ b/aux/ci/git-pre-push.sh
@@ -1,6 +1,8 @@
#!/bin/sh
set -eux
+TLD="$(cat aux/tld.txt)"
+
PACKAGE="$(basename "$PWD")"
LOGS_DIR="/opt/ci/$PACKAGE/logs"
REMOTE_GIT_DIR="/srv/git/$PACKAGE.git"
@@ -13,7 +15,7 @@ else
git config euandreh.description > "$DESCRIPTION"
fi
-scp "$DESCRIPTION" "git.euandreh.xyz:$REMOTE_GIT_DIR/description"
-ssh git.euandreh.xyz mkdir -p "$LOGS_DIR"
-scp aux/ci/ci-build.sh "git.euandreh.xyz:$(dirname "$LOGS_DIR")/ci-build.sh"
-scp aux/ci/git-post-receive.sh "git.euandreh.xyz:$REMOTE_GIT_DIR/hooks/post-receive"
+scp "$DESCRIPTION" "$TLD:$REMOTE_GIT_DIR/description"
+ssh "$TLD" mkdir -p "$LOGS_DIR"
+scp aux/ci/ci-build.sh "$TLD:$(dirname "$LOGS_DIR")/ci-build.sh"
+scp aux/ci/git-post-receive.sh "$TLD:$REMOTE_GIT_DIR/hooks/post-receive"
diff --git a/aux/tld.txt b/aux/tld.txt
new file mode 100644
index 0000000..0cb8b8b
--- /dev/null
+++ b/aux/tld.txt
@@ -0,0 +1 @@
+euandreh.xyz
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh
index ae38fc7..80059ee 100755
--- a/aux/workflow/TODOs.sh
+++ b/aux/workflow/TODOs.sh
@@ -6,14 +6,17 @@ mkdir -p public
PROJECT_UC="$1"
PROJECT="$2"
MAILING_LIST="$3"
+TLD="$(cat aux/tld.txt)"
TODOS_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<span class="header-anchor" id="\3">#\3<\/span>\n/'
TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g'
-sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
- -e "s:@PROJECT@:$PROJECT:g" \
- -e "s:@MAILING_LIST@:$MAILING_LIST:g" < aux/workflow/preamble.md | \
+sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \
+ -e "s:@PROJECT@:$PROJECT:g" \
+ -e "s:@MAILING_LIST@:$MAILING_LIST:g" \
+ -e "s:@TLD@:$TLD:g" \
+ < aux/workflow/preamble.md | \
printf \
'%s\n\n%s' \
"$(cat -)" \
diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh
index 2f63ded..cef75dd 100755
--- a/aux/workflow/assert-readme.sh
+++ b/aux/workflow/assert-readme.sh
@@ -5,6 +5,7 @@ mkdir -p public
PROJECT="$1"
MAILING_LIST="$2"
+TLD="$(cat aux/tld.txt)"
EXPECTED="$(mktemp)"
cat <<EOF >> "$EXPECTED"
@@ -22,14 +23,14 @@ $ make public
\`\`\`
-# Links
+## Links
-- [home page](https://$PROJECT.euandreh.xyz)
+- [home page](https://$TLD/$PROJECT/)
- [source code](https://git.euandreh.xyz/$PROJECT/)
-- [bug tracking](https://$PROJECT.euandreh.xyz/TODOs.html)
+- [bug tracking](https://$TLD/$PROJECT/TODOs.html)
- [mailing list](https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D)
-- [CI logs](https://$PROJECT.euandreh.xyz/ci.html)
-- [CHANGELOG](https://$PROJECT.euandreh.xyz/CHANGELOG.html)
+- [CI logs](https://$TLD/$PROJECT/ci.html)
+- [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html)
EOF
RELEASES_LIST="$(mktemp)"
@@ -38,10 +39,20 @@ for version in $(git tag | perl -e 'print reverse <>'); do
done
if [ -s "$RELEASES_LIST" ]; then
- printf '\n\n# Releases\n\n' >> "$EXPECTED"
+ printf '\n\n## Releases\n\n' >> "$EXPECTED"
cat "$RELEASES_LIST" >> "$EXPECTED"
fi
+cat <<EOF >> "$EXPECTED"
+
+
+## License
+
+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://www.gnu.org/licenses/agpl-3.0.en.html
+EOF
+
if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then
echo 'Missing metadata at the end of README.md file'
exit 1
diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md
index 9fbbd2c..30efe0b 100644
--- a/aux/workflow/preamble.md
+++ b/aux/workflow/preamble.md
@@ -2,7 +2,7 @@
TODOs for @PROJECT_UC@.
-See also [@PROJECT@.euandreh.xyz](https://@PROJECT@.euandreh.xyz/) and [CI logs](https://@PROJECT@.euandreh.xyz/ci.html).
+See also [@TLD@/@PROJECT@/](https://@TLD@/@PROJECT@/) and [CI logs](https://@TLD@/@PROJECT@/ci.html).
Register a new one at
[~euandreh/@MAILING_LIST@@lists.sr.ht](mailto:~euandreh/@MAILING_LIST@@lists.sr.ht?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E)
diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh
index 14a8e65..8ecb855 100755
--- a/aux/workflow/public.sh
+++ b/aux/workflow/public.sh
@@ -6,7 +6,7 @@ PROJECT="$2"
MAILING_LIST="$3"
sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST"
-sh aux/workflow/commonmark.sh "$PROJECT" README.md index.html
+sh aux/workflow/commonmark.sh "$PROJECT" README.md index.html ||:
if [ -f CHANGELOG.md ]; then
sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md