diff options
author | EuAndreh <eu@euandre.org> | 2022-01-13 15:02:40 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-01-13 15:02:40 -0300 |
commit | c98d6c8175a1b2fe4452990b6ac19346411b637d (patch) | |
tree | b089c7bf575b58d94951a651be32869a94a2f396 /aux | |
parent | src/xyz/euandreh/queue.scm: Change pymd4c to upstream repository (diff) | |
download | package-repository-c98d6c8175a1b2fe4452990b6ac19346411b637d.tar.gz package-repository-c98d6c8175a1b2fe4452990b6ac19346411b637d.tar.xz |
aux/: Update
Diffstat (limited to '')
-rwxr-xr-x | aux/80-columns.sh | 12 | ||||
-rwxr-xr-x | aux/assert-shellcheck.sh | 4 | ||||
-rwxr-xr-x | aux/ci/ci-build.sh | 11 | ||||
-rwxr-xr-x | aux/ci/git-post-receive.sh | 3 | ||||
-rwxr-xr-x | aux/ci/report.sh | 66 | ||||
-rw-r--r-- | aux/containers/guix/manifest.scm | 24 | ||||
-rwxr-xr-x | aux/containers/guix/with-container.sh | 19 | ||||
-rw-r--r-- | aux/guix/pinned-channels.scm | 11 | ||||
-rwxr-xr-x | aux/guix/with-container.sh | 6 | ||||
-rwxr-xr-x | aux/lib.sh | 4 | ||||
l--------- | aux/with-container | 1 | ||||
-rwxr-xr-x | aux/workflow/TODOs.sh | 6 | ||||
-rwxr-xr-x | aux/workflow/assert-changelog.sh | 15 | ||||
-rwxr-xr-x | aux/workflow/assert-readme.sh | 17 | ||||
-rwxr-xr-x | aux/workflow/assert-todos.sh | 3 | ||||
-rwxr-xr-x | aux/workflow/commonmark.sh | 10 | ||||
-rwxr-xr-x | aux/workflow/dist.sh | 29 | ||||
-rw-r--r-- | aux/workflow/favicon.png | bin | 2372 -> 0 bytes | |||
-rwxr-xr-x | aux/workflow/public.sh | 38 | ||||
-rwxr-xr-x | aux/workflow/sign-tarballs.sh | 17 | ||||
-rw-r--r-- | aux/workflow/style.css | 99 |
21 files changed, 272 insertions, 123 deletions
diff --git a/aux/80-columns.sh b/aux/80-columns.sh new file mode 100755 index 0000000..ae4660e --- /dev/null +++ b/aux/80-columns.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -eu + +# shellcheck disable=2068 +for f in ${@:-$(cat -)}; do + if [ "$(file -i "$f" | cut -d' ' -f2 | cut -d/ -f1)" = 'text' ]; then + sed 's/\t/ /g' "$f" | + awk -v FNAME="$f" 'length > 80 { + printf "%s:%s:%s\n", FNAME, NR, $0 + }' + fi +done diff --git a/aux/assert-shellcheck.sh b/aux/assert-shellcheck.sh index 1779ea8..40fd364 100755 --- a/aux/assert-shellcheck.sh +++ b/aux/assert-shellcheck.sh @@ -1,6 +1,6 @@ #!/bin/sh set -eu -git ls-files | \ - xargs awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \ +find . -name '*.sh' -print0 | + xargs -0 awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | xargs shellcheck diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh index 17e9e37..34233b7 100755 --- a/aux/ci/ci-build.sh +++ b/aux/ci/ci-build.sh @@ -8,7 +8,8 @@ FILENAME="$(date -Is)-$SHA.log" LOGFILE="$LOGS_DIR/$FILENAME" mkdtemp() { - name="$(echo 'mkstemp(template)' | m4 -D template="${TMPDIR:-/tmp}/m4-tmpname.")" + name="$(echo 'mkstemp(template)' | + m4 -D template="${TMPDIR:-/tmp}/m4-tmpname.")" rm -f "$name" mkdir "$name" echo "$name" @@ -37,7 +38,8 @@ EOF sh aux/ci/report.sh -n "$PROJECT" -o public rsync -av public/ "/srv/http/$PROJECT/" --delete - printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s\n\n" "$STATUS" + printf '\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s\n>>>\n\n' \ + "$STATUS" } trap finish EXIT @@ -47,10 +49,9 @@ EOF git clone "$REMOTE" . git config --global user.email git@euandre.org git config --global user.name 'EuAndreh CI' - git annex get ||: - if [ -f aux/guix/with-container.sh ]; then - RUNNER='sh aux/guix/with-container.sh' + if [ -e aux/with-container ]; then + RUNNER='sh aux/with-container' else RUNNER='sh -c' fi diff --git a/aux/ci/git-post-receive.sh b/aux/ci/git-post-receive.sh index 426bff3..92bba73 100755 --- a/aux/ci/git-post-receive.sh +++ b/aux/ci/git-post-receive.sh @@ -4,7 +4,8 @@ set -eu for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do opt="$(eval "echo \$GIT_PUSH_OPTION_$n")" if [ "$opt" = skip-ci ] || [ "$opt" = ci-skip ]; then - printf "\n'%s' option detected, not running ci-build.sh\n\n" "$opt" + printf "\n'%s' option detected, not running ci-build.sh\n\n" \ + "$opt" exit 0 fi done diff --git a/aux/ci/report.sh b/aux/ci/report.sh index 1aa41a0..e900e26 100755 --- a/aux/ci/report.sh +++ b/aux/ci/report.sh @@ -41,30 +41,45 @@ 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" > "$OUTDIR/ci-data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" > "$OUTDIR/ci-logs/$FILENAME" + git notes --ref=refs/notes/ci-logs show "$c" \ + > "$OUTDIR/ci-logs/$FILENAME" done -cat <<EOF >> "$OUT" +{ + cat <<EOF <!DOCTYPE html> <html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="icon" type="image/svg+xml" href="favicon.svg" /> - <title>CI logs for $PROJECT</title> - - <style> - pre { - display: inline; - } - </style> - </head> - <body> - <h1> - CI logs for <a href="https://$TLD/$PROJECT/en/">$PROJECT</a> - </h1> - <ul> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="description" content="CI logs for $PROJECT" /> + <link rel="icon" type="image/svg+xml" href="favicon.svg" /> + <title>$PROJECT - CI logs</title> + +EOF + + cat aux/workflow/style.css + + cat <<EOF + + <style> + pre { + display: inline; + } + ol { + list-style-type: disc; + } + </style> + </head> + <body> + <main> + <h1> + CI logs for + <a href="https://$TLD/$PROJECT/en/">$PROJECT</a> + </h1> + <ol> EOF +} > "$OUT" for f in $(find "$OUTDIR/ci-data/" -type f | LANG=C.UTF-8 sort -r); do DATA="$(cat "$f")" @@ -78,17 +93,16 @@ for f in $(find "$OUTDIR/ci-data/" -type f | LANG=C.UTF-8 sort -r); do fi cat <<EOF >> "$OUT" - <li> - <a href="ci-logs/$FILENAME"> - $STATUS_MARKER <pre>$FILENAME</pre> - </a> - </li> + <li> + <a href="ci-logs/$FILENAME">$STATUS_MARKER <pre>$FILENAME</pre></a> + </li> EOF done cat <<EOF >> "$OUT" - </ul> - </body> + </ol> + </main> + </body> </html> EOF diff --git a/aux/containers/guix/manifest.scm b/aux/containers/guix/manifest.scm new file mode 100644 index 0000000..f670fdd --- /dev/null +++ b/aux/containers/guix/manifest.scm @@ -0,0 +1,24 @@ +(specifications->manifest + (map symbol->string + '(bash + coreutils + findutils + diffutils + grep + sed + m4 + git + gawk + make + makefile2graph + graphviz + shellcheck + pandoc + gettext + po4a-text + mdpo-patched + hunspell + hunspell-dict-en-utf8 + hunspell-dict-pt-utf8 + hunspell-dict-fr-utf8 + hunspell-dict-eo-utf8))) diff --git a/aux/containers/guix/with-container.sh b/aux/containers/guix/with-container.sh new file mode 100755 index 0000000..fcbb8b5 --- /dev/null +++ b/aux/containers/guix/with-container.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -eu + +CHANNEL_REMOTE='https://euandreh.xyz/package-repository.git' +CHANNEL_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/euandreh-guix-channel" + +if [ ! -d "$CHANNEL_DIR" ]; then + git clone "$CHANNEL_REMOTE" "$CHANNEL_DIR" +fi + +git -C "$CHANNEL_DIR" pull + +ENV_CMD="guix environment -L $CHANNEL_DIR/src/ -m aux/containers/guix/manifest.scm" + +if [ -z "${1:-}" ]; then + $ENV_CMD +else + $ENV_CMD --pure -C -- sh -c "$@" +fi diff --git a/aux/guix/pinned-channels.scm b/aux/guix/pinned-channels.scm deleted file mode 100644 index 504406f..0000000 --- a/aux/guix/pinned-channels.scm +++ /dev/null @@ -1,11 +0,0 @@ -(cons* - (channel - (name 'xyz-euandreh) - (url "git://euandreh.xyz/package-repository") - (branch "main") - (introduction - (make-channel-introduction - "d749e053e6db365069cb9b2ef47a78b06f9e7361" - (openpgp-fingerprint - "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060")))) - %default-channels) diff --git a/aux/guix/with-container.sh b/aux/guix/with-container.sh index 408fb39..6e19691 100755 --- a/aux/guix/with-container.sh +++ b/aux/guix/with-container.sh @@ -7,7 +7,11 @@ if [ -z "${1:-}" ]; then elif [ "$1" = '-p' ]; then guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ environment --fallback -m aux/guix/manifest.scm --pure -C +elif [ "$1" = '-C' ]; then + guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ + pack -f docker -S/bin=bin -m aux/guix/manifest.scm -v3 else guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm --pure -C -- sh -c "$@" + environment --fallback -m aux/guix/manifest.scm --pure -C \ + -- sh -c "$@" fi @@ -7,8 +7,8 @@ uuid() { # Taken from: # https://serverfault.com/a/799198 - od -xN20 /dev/urandom | \ - head -1 | \ + od -xN20 /dev/urandom | + head -1 | awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}' } diff --git a/aux/with-container b/aux/with-container new file mode 120000 index 0000000..b96cf67 --- /dev/null +++ b/aux/with-container @@ -0,0 +1 @@ +containers/guix/with-container.sh
\ No newline at end of file diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index d875e0e..efc0b04 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -46,14 +46,14 @@ IDS_REGEX='s:^## \(TODO\|DOING\|WAITING\|MEETING\|INACTIVE\|NEXT\|CANCELLED\|DON :g' TAGS_REGEX='s|tag:\([a-z0-9-]*\)|<span class="tag">\1</span>|g' -cat aux/workflow/preamble.md TODOs.md | \ +cat aux/workflow/preamble.md TODOs.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" \ -e "$IDS_REGEX" \ - -e "$TAGS_REGEX" | \ + -e "$TAGS_REGEX" | pandoc \ --toc \ --highlight-style pygments \ @@ -64,7 +64,7 @@ cat aux/workflow/preamble.md TODOs.md | \ -r commonmark \ -w html \ -H aux/workflow/favicon.html \ - -H aux/workflow/style.css | \ + -H aux/workflow/style.css | sed \ -e 's:<a><a:<a:g' \ -e 's:</a></a>:</a>:g' \ diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh index 7f9117f..c58a600 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://euandreh.xyz/%s.git/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 diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh index 333a753..7afeb4c 100755 --- a/aux/workflow/assert-readme.sh +++ b/aux/workflow/assert-readme.sh @@ -1,6 +1,10 @@ #!/bin/sh set -eu +if [ ! -e .git ]; then + exit +fi + TLD="$(cat aux/tld.txt)" . aux/lib.sh @@ -44,13 +48,14 @@ and for generating the documentation HTML and website, run: $ make public \`\`\` -Send contributions to the [mailing list] via [\`git send-email\`](https://git-send-email.io/). +Send contributions to the [mailing list] via +[\`git send-email\`](https://git-send-email.io/). ## Links - [homepage](https://$TLD/$PROJECT/en/) -- [source code](https://git.euandreh.xyz/$PROJECT/) +- [source code](https://euandreh.xyz/$PROJECT.git/) - [bug tracking](https://$TLD/$PROJECT/TODOs.html) - [mailing list] - [CI logs](https://$TLD/$PROJECT/ci.html) @@ -63,7 +68,7 @@ RELEASES_LIST="$(mkstemp)" add_release() { DATE="$1" VVERSION="$2" - 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" + echo "- [$VVERSION](https://euandreh.xyz/$PROJECT.git/commit/?id=$VVERSION) [$PROJECT-$VVERSION.tar.gz](https://euandreh.xyz/$PROJECT.git/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://euandreh.xyz/$PROJECT.git/snapshot/$PROJECT-$VVERSION.tar.gz.asc)) - $DATE" >> "$RELEASES_LIST" } for VVERSION in $(git tag); do @@ -89,9 +94,11 @@ 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). +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://git.euandreh.xyz/$PROJECT/tree/COPYING +[AGPL-3.0-or-later]: https://euandreh.xyz/.git$PROJECT/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 dfa1ab7..bc4907d 100755 --- a/aux/workflow/assert-todos.sh +++ b/aux/workflow/assert-todos.sh @@ -1,7 +1,8 @@ #!/bin/sh set -eu -if git grep FIXME | grep -v '^TODOs.md' | grep -v '^aux/workflow/assert-todos.sh'; then +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." exit 1 diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh index 6f5e59b..088d447 100755 --- a/aux/workflow/commonmark.sh +++ b/aux/workflow/commonmark.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -while getopts 'N:t:l:' flag; do +while getopts 'N:t:l:H:' flag; do case "$flag" in N) PROJECT_UC="$OPTARG" @@ -12,6 +12,9 @@ while getopts 'N:t:l:' flag; do l) THE_LANG="$OPTARG" ;; + H) + ALTERNATES="$OPTARG" + ;; *) exit 2 ;; @@ -29,6 +32,7 @@ assert_arg() { assert_arg "${PROJECT_UC:-}" '-N PROJECT_UC' assert_arg "${TITLE:-}" '-t TITLE' assert_arg "${THE_LANG:-}" '-l THE_LANG' +assert_arg "${ALTERNATES:-}" '-H ALTERNATES' pandoc \ --toc \ @@ -39,4 +43,6 @@ pandoc \ --metadata "lang=$THE_LANG" \ -r commonmark \ -w html \ - -H aux/workflow/favicon.html + -H aux/workflow/favicon.html \ + -H aux/workflow/style.css \ + -H "$ALTERNATES" diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh index 15593f4..a433478 100755 --- a/aux/workflow/dist.sh +++ b/aux/workflow/dist.sh @@ -42,13 +42,21 @@ if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi + +if [ "$(git rev-parse --abbrev-ref HEAD)" != 'main' ]; then + echo 'Not on branch "main".' >&2 + exit 1 +fi + if git show "$VVERSION" 1>/dev/null 2>/dev/null; then echo "Version '$VVERSION' already exists." >&2 exit 1 fi -sh aux/workflow/assert-changelog.sh -N "$PROJECT_UC" -n "$PROJECT" "$VVERSION" -sh aux/workflow/assert-readme.sh -n "$PROJECT" -m "$MAILING_LIST" "$VVERSION" +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 +fi if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then echo "Date '$DATE' is not up-to-date." >&2 @@ -60,21 +68,32 @@ if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then exit 1 fi +make clean public dev-check EXTRA_VERSION="$VVERSION" + if ! (git diff --quiet && git diff --quiet --staged); then echo 'Dirty repository.' exit 1 fi -git tag "$VVERSION" +git tag "$VVERSION" sh aux/workflow/sign-tarballs.sh -n "$PROJECT" -cat <<EOF >&2 +printf 'Publish version? [Y/n]: ' >&2 +read -r publish + +if [ "$publish" = 'n' ]; then + cat <<EOF >&2 Now push the tag and the signature before pushing the commit: -git push origin refs/notes/signatures/tar.xz -o skip-ci --no-verify +git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify git push --tags -o skip-ci --no-verify git push EOF +else + git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify + git push --tags -o skip-ci --no-verify + git push +fi diff --git a/aux/workflow/favicon.png b/aux/workflow/favicon.png Binary files differdeleted file mode 100644 index 051fdf1..0000000 --- a/aux/workflow/favicon.png +++ /dev/null diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh index f9f3b3d..2c8c36a 100755 --- a/aux/workflow/public.sh +++ b/aux/workflow/public.sh @@ -1,6 +1,9 @@ #!/bin/sh set -eu +TLD="$(cat aux/tld.txt)" +. aux/lib.sh + PROJECT_UC= while getopts 'n:N:m:o:l:' flag; do case "$flag" in @@ -39,19 +42,42 @@ assert_arg "${OUTDIR:-}" '-o OUTDIR' assert_arg "${LANGS:-}" '-l LANGS' PROJECT_UC="${PROJECT_UC:-$PROJECT}" + +alternates_for() { + ALTERNATES="$(mkstemp)" + lang="$1" + OUTNAME="$2" + for l in $LANGS; do + if [ "$l" = "$lang" ]; then + continue + fi + cat <<EOF >> "$ALTERNATES" +<link rel="alternate" href="https://$TLD/$PROJECT/$l/$OUTNAME" hreflang="$l" /> +EOF + done + echo "$ALTERNATES" +} + + mkdir -p "$OUTDIR" -sh aux/workflow/TODOs.sh -N "$PROJECT_UC" -n "$PROJECT" -m "$MAILING_LIST" -o "$OUTDIR" +sh aux/workflow/TODOs.sh \ + -N "$PROJECT_UC" -n "$PROJECT" -m "$MAILING_LIST" -o "$OUTDIR" 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" + sh aux/workflow/commonmark.sh \ + -N "$PROJECT" -l "$lang" -t README \ + -H "$(alternates_for "$lang" '')" \ + < "README.$lang.md" > "$OUTDIR/$lang/index.html" + sh aux/workflow/commonmark.sh \ + -N "$PROJECT" -l "$lang" -t CHANGELOG \ + -H "$(alternates_for "$lang" 'CHANGELOG.html')" \ + < "CHANGELOG.$lang.md" > "$OUTDIR/$lang/CHANGELOG.html" + ln -fs ../favicon.svg "$OUTDIR/$lang" done 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" +cp aux/workflow/favicon.svg "$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 3775e28..3ab2bb8 100755 --- a/aux/workflow/sign-tarballs.sh +++ b/aux/workflow/sign-tarballs.sh @@ -23,15 +23,16 @@ assert_arg() { assert_arg "${PROJECT:-}" '-n PROJECT' -SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.xz list | cut -d\ -f2)" +SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.gz 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.xz add -C "$( - git archive --format tar.xz --prefix "$PROJECT-$tag/" "$tag" | - gpg --output - --armor --detach-sign | - git hash-object -w --stdin - )" "$tag" + if echo "$SIGNATURES" | grep -qF "$COMMIT"; then + continue fi + echo "Adding missing signature to $tag" >&2 + git notes --ref=refs/notes/signatures/tar.gz add -C "$( + git archive --format tar.gz --prefix "$PROJECT-$tag/" "$tag" | + gpg --output - --armor --detach-sign | + git hash-object -w --stdin + )" "$tag" done diff --git a/aux/workflow/style.css b/aux/workflow/style.css index d72991e..56e4712 100644 --- a/aux/workflow/style.css +++ b/aux/workflow/style.css @@ -1,41 +1,62 @@ <style> - hr { - background-color: #ccc; - } - - .header-anchor { - opacity: 0.5; - } - - .tag { - font-family: monospace; - font-size: 70%; - background-color: lightgray; - padding: 3px; - border-radius: 5px; - } - - .TODO { - color: brown; - } - - .DOING { - color: yellowgreen; - } - - .WAITING, .MEETING { - color: orange; - } - - .INACTIVE { - color: gray; - } - - .NEXT { - color: red; - } - - .CANCELLED, .DONE, .WONTFIX { - color: green; - } + @media(prefers-color-scheme: dark) { + :root { + color: white; + background-color: black; + } + + a { + color: hsl(211, 100%, 60%); + } + + a:visited { + color: hsl(242, 100%, 80%); + } + } + + body { + max-width: 800px; + margin: 0 auto 0 auto; + } + + hr { + background-color: #ccc; + } + + .header-anchor { + opacity: 0.5; + } + + .tag { + font-family: monospace; + font-size: 70%; + background-color: lightgray; + color: black; + padding: 3px; + border-radius: 5px; + } + + .TODO { + color: brown; + } + + .DOING { + color: yellowgreen; + } + + .WAITING, .MEETING { + color: orange; + } + + .INACTIVE { + color: gray; + } + + .NEXT { + color: red; + } + + .CANCELLED, .DONE, .WONTFIX { + color: green; + } </style> |