From 301a644485dac428e6ef09396bbc9f7c3180849b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 25 Jul 2021 16:00:57 -0300 Subject: aux/: Update --- aux/workflow/TODOs.sh | 34 ++++++++-------- aux/workflow/assert-changelog.sh | 2 +- aux/workflow/assert-readme.sh | 12 +++--- aux/workflow/assert-todos.sh | 4 +- aux/workflow/commonmark.sh | 45 ++++++++-------------- aux/workflow/dist.sh | 2 +- aux/workflow/preamble.md | 4 +- aux/workflow/public.sh | 35 ++++++++--------- aux/workflow/sign-tarballs.sh | 6 +-- aux/workflow/style.css | 83 +++++++++++++++++++--------------------- 10 files changed, 102 insertions(+), 125 deletions(-) (limited to 'aux/workflow') diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index 6c24c3e..d875e0e 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -39,21 +39,21 @@ if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi -TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## \1<\/span> \2<\/a>\n
#\3<\/pre>\n/'
-TODOS_CLEANUP_REGEX1='s/(::g' \
 	> "$OUTDIR/TODOs.html"
diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh
index 11088a8..7f9117f 100755
--- a/aux/workflow/assert-changelog.sh
+++ b/aux/workflow/assert-changelog.sh
@@ -31,7 +31,7 @@ if [ -z "${PROJECT_UC:-}" ]; then
 	PROJECT_UC="$PROJECT"
 fi
 
-HOMEPAGE_LINK="Changelog for [$PROJECT_UC](https://$TLD/$PROJECT/)."
+HOMEPAGE_LINK="Changelog for [$PROJECT_UC](https://$TLD/$PROJECT/en/)."
 
 if ! grep -qF "$HOMEPAGE_LINK" CHANGELOG.md; then
 	echo "Missing link to homepage in CHANGELOG.md:" >&2
diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh
index f8a05a4..333a753 100755
--- a/aux/workflow/assert-readme.sh
+++ b/aux/workflow/assert-readme.sh
@@ -2,6 +2,8 @@
 set -eu
 
 TLD="$(cat aux/tld.txt)"
+. aux/lib.sh
+
 while getopts 'n:m:' flag; do
 	case "$flag" in
 		n)
@@ -27,7 +29,7 @@ assert_arg() {
 assert_arg "${PROJECT:-}" '-n PROJECT'
 assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST'
 
-EXPECTED="$(mktemp)"
+EXPECTED="$(mkstemp)"
 cat <> "$EXPECTED"
 
 For running the extra development-only checks, run:
@@ -47,21 +49,21 @@ Send contributions to the [mailing list] via [\`git send-email\`](https://git-se
 
 ## Links
 
-- [homepage](https://$TLD/$PROJECT/)
+- [homepage](https://$TLD/$PROJECT/en/)
 - [source code](https://git.euandreh.xyz/$PROJECT/)
 - [bug tracking](https://$TLD/$PROJECT/TODOs.html)
 - [mailing list]
 - [CI logs](https://$TLD/$PROJECT/ci.html)
-- [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html)
+- [CHANGELOG](https://$TLD/$PROJECT/en/CHANGELOG.html)
 
 [mailing list]: https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
 EOF
 
-RELEASES_LIST="$(mktemp)"
+RELEASES_LIST="$(mkstemp)"
 add_release() {
 	DATE="$1"
 	VVERSION="$2"
-	echo "- [$VVERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) [$PROJECT-$VVERSION.tar.gz](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz.asc)), released in $DATE" >> "$RELEASES_LIST"
+	echo "- [$VVERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) [$PROJECT-$VVERSION.tar.xz](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.xz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.xz.asc)) - $DATE" >> "$RELEASES_LIST"
 }
 
 for VVERSION in $(git tag); do
diff --git a/aux/workflow/assert-todos.sh b/aux/workflow/assert-todos.sh
index ca73b7f..dfa1ab7 100755
--- a/aux/workflow/assert-todos.sh
+++ b/aux/workflow/assert-todos.sh
@@ -29,8 +29,8 @@ h2flag == 1 {
 	h2flag = 0
 }
 
-/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE)/ {
-	if (match($0, / \{#.*?\}$/) == 0) {
+/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE|WONTFIX)/ {
+	if (match($0, / \{#.*?\}.*$/) == 0) {
 		print "Missing ID for line " NR ":\n" $0
 		exitstatus = 1
 	}
diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh
index b196867..6f5e59b 100755
--- a/aux/workflow/commonmark.sh
+++ b/aux/workflow/commonmark.sh
@@ -1,21 +1,15 @@
 #!/bin/sh
 set -eu
 
-while getopts 'N:o:r:w:L:' flag; do
+while getopts 'N:t:l:' flag; do
 	case "$flag" in
 		N)
 			PROJECT_UC="$OPTARG"
 			;;
-		o)
-			OUTDIR="$OPTARG"
+		t)
+			TITLE="$OPTARG"
 			;;
-		r)
-			IN_FILE="$OPTARG"
-			;;
-		w)
-			OUT_FILE="$OPTARG"
-			;;
-		L)
+		l)
 			THE_LANG="$OPTARG"
 			;;
 		*)
@@ -33,25 +27,16 @@ assert_arg() {
 }
 
 assert_arg "${PROJECT_UC:-}" '-N PROJECT_UC'
-assert_arg "${OUTDIR:-}"     '-o OUTDIR'
-assert_arg "${IN_FILE:-}"    '-i IN_FILE'
-assert_arg "${THE_LANG:-}"   '-L THE_LANG'
-
-if [ -z "${OUT_FILE:-}" ]; then
-	OUT_FILE="${IN_FILE%.md}.html"
-fi
-
-OUT="$OUTDIR/$OUT_FILE"
-mkdir -p "$(dirname "$OUT")"
+assert_arg "${TITLE:-}"      '-t TITLE'
+assert_arg "${THE_LANG:-}"   '-l THE_LANG'
 
 pandoc \
-	--toc                                           \
-	--highlight-style pygments                      \
-	--toc-depth=2                                   \
-	-s                                              \
-	--metadata title="$PROJECT_UC - ${IN_FILE%%.*}" \
-	--metadata "lang=$THE_LANG"                     \
-	-r commonmark                                   \
-	-w html                                         \
-	-H aux/workflow/favicon.html                    \
-	< "$IN_FILE" > "$OUT"
+	--toc                                   \
+	--highlight-style pygments              \
+	--toc-depth=2                           \
+	-s                                      \
+	--metadata title="$PROJECT_UC - $TITLE" \
+	--metadata "lang=$THE_LANG"             \
+	-r commonmark                           \
+	-w html                                 \
+	-H aux/workflow/favicon.html
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index 69c0173..15593f4 100755
--- a/aux/workflow/dist.sh
+++ b/aux/workflow/dist.sh
@@ -73,7 +73,7 @@ sh aux/workflow/sign-tarballs.sh -n "$PROJECT"
 cat <&2
 Now push the tag and the signature before pushing the commit:
 
-git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify
+git push origin refs/notes/signatures/tar.xz -o skip-ci --no-verify
 git push --tags -o skip-ci --no-verify
 git push
 
diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md
index dcc2fc3..ee32d58 100644
--- a/aux/workflow/preamble.md
+++ b/aux/workflow/preamble.md
@@ -1,9 +1,9 @@
 # About
 
-TODOs for [@PROJECT_UC@](https://@TLD@/@PROJECT@/).
+TODOs for [@PROJECT_UC@](https://@TLD@/@PROJECT@/en/).
 
 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)
+[~euandreh/@MAILING_LIST@@lists.sr.ht](mailto:~euandreh/@MAILING_LIST@@lists.sr.ht?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E)
 and see [existing discussions](https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@PROJECT@%5D).
 
 *Você também pode escrever em português*.
diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh
index be32ac1..f9f3b3d 100755
--- a/aux/workflow/public.sh
+++ b/aux/workflow/public.sh
@@ -33,30 +33,25 @@ assert_arg() {
 	fi
 }
 
-assert_arg "${PROJECT:-}"      '-n PROJECT'
-assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST'
-assert_arg "${OUTDIR:-}"       '-o OUTDIR'
-
-if [ -z "${PROJECT_UC:-}" ]; then
-	PROJECT_UC="$PROJECT"
-fi
+assert_arg "${PROJECT:-}"            '-n PROJECT'
+assert_arg "${MAILING_LIST:-}"       '-m MAILING_LIST'
+assert_arg "${OUTDIR:-}"             '-o OUTDIR'
+assert_arg "${LANGS:-}"              '-l LANGS'
+PROJECT_UC="${PROJECT_UC:-$PROJECT}"
 
 mkdir -p "$OUTDIR"
 
 sh aux/workflow/TODOs.sh -N "$PROJECT_UC" -n "$PROJECT" -m "$MAILING_LIST" -o "$OUTDIR"
 
-sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r README.md -w index.html -Len
-if [ -f CHANGELOG.md ]; then
-	sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r CHANGELOG.md -Len
-fi
-if [ -n "${LANGS:-}" ]; then
-	for lang in $LANGS; do
-		sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r "README.$lang.md" -w "$lang/index.html" -L "$lang"
-		if [ -f CHANGELOG.md ]; then
-			sh aux/workflow/commonmark.sh -N "$PROJECT" -o "$OUTDIR" -r "CHANGELOG.$lang.md" -w "$lang/CHANGELOG.html" -L "$lang"
-		fi
-	done
-fi
+for lang in $LANGS; do
+	mkdir -p "$OUTDIR/$lang/"
+	sh aux/workflow/commonmark.sh -N "$PROJECT" -t README    -l "$lang" < "README.$lang.md"    > "$OUTDIR/$lang/index.html"
+	sh aux/workflow/commonmark.sh -N "$PROJECT" -t CHANGELOG -l "$lang" < "CHANGELOG.$lang.md" > "$OUTDIR/$lang/CHANGELOG.html"
+	cp aux/workflow/favicon.svg aux/workflow/favicon.png "$OUTDIR/$lang"
+done
 
-sh aux/ci/report.sh -n "$PROJECT" -o "$OUTDIR"
+ln -fs en/index.html "$OUTDIR/index.html"
+ln -fs en/CHANGELOG.html "$OUTDIR/CHANGELOG.html"
 cp aux/workflow/favicon.svg aux/workflow/favicon.png "$OUTDIR"
+
+sh aux/ci/report.sh -n "$PROJECT" -o "$OUTDIR"
diff --git a/aux/workflow/sign-tarballs.sh b/aux/workflow/sign-tarballs.sh
index 168d38d..3775e28 100755
--- a/aux/workflow/sign-tarballs.sh
+++ b/aux/workflow/sign-tarballs.sh
@@ -23,13 +23,13 @@ assert_arg() {
 assert_arg "${PROJECT:-}" '-n PROJECT'
 
 
-SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.gz list | cut -d\  -f2)"
+SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.xz list | cut -d\  -f2)"
 for tag in $(git tag); do
 	COMMIT="$(git rev-list -n1 "$tag")"
 	if ! echo "$SIGNATURES" | grep -qF "$COMMIT"; then
 		echo "Adding missing signature to $tag" >&2
-		git notes --ref=refs/notes/signatures/tar.gz add -f -C "$(
-			git archive --format tar.gz --prefix "$PROJECT-${tag#v}/" "$tag" |
+		git notes --ref=refs/notes/signatures/tar.xz add -C "$(
+			git archive --format tar.xz --prefix "$PROJECT-$tag/" "$tag" |
 			gpg --output - --armor --detach-sign |
 			git hash-object -w --stdin
 		)" "$tag"
diff --git a/aux/workflow/style.css b/aux/workflow/style.css
index d7935d0..d72991e 100644
--- a/aux/workflow/style.css
+++ b/aux/workflow/style.css
@@ -1,46 +1,41 @@
 
-- 
cgit v1.2.3