diff options
author | EuAndreh <eu@euandre.org> | 2021-02-22 23:55:06 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-02-22 23:57:17 -0300 |
commit | ae8e26ef8715d379daa8f83b0cff88e1f51734f2 (patch) | |
tree | 59a27be334a5c7ee3b5f24ba651ea3b602bedc24 /aux | |
parent | Update aux/guix/pinned-channels.scm, use nixfmt over ghc-nixfmt (diff) | |
download | package-repository-ae8e26ef8715d379daa8f83b0cff88e1f51734f2.tar.gz package-repository-ae8e26ef8715d379daa8f83b0cff88e1f51734f2.tar.xz |
Update aux/guix/ and aux/workflow/
Diffstat (limited to 'aux')
-rw-r--r-- | aux/guix/manifest.scm | 4 | ||||
-rw-r--r-- | aux/guix/pinned-channels.scm | 3 | ||||
-rwxr-xr-x | aux/workflow/README.sh | 17 | ||||
-rwxr-xr-x | aux/workflow/TODOs.sh | 11 | ||||
-rwxr-xr-x | aux/workflow/commonmark.sh | 17 | ||||
-rwxr-xr-x | aux/workflow/dist.sh | 17 | ||||
-rw-r--r-- | aux/workflow/preamble.md | 2 | ||||
-rw-r--r-- | aux/workflow/public.sh | 15 | ||||
-rw-r--r-- | aux/workflow/style.css | 10 |
9 files changed, 85 insertions, 11 deletions
diff --git a/aux/guix/manifest.scm b/aux/guix/manifest.scm index 67a9eef..9d3b266 100644 --- a/aux/guix/manifest.scm +++ b/aux/guix/manifest.scm @@ -13,6 +13,6 @@ make perl shellcheck - pandoc gettext - nixfmt))) + groff + pandoc))) diff --git a/aux/guix/pinned-channels.scm b/aux/guix/pinned-channels.scm index 418e923..826a352 100644 --- a/aux/guix/pinned-channels.scm +++ b/aux/guix/pinned-channels.scm @@ -2,8 +2,7 @@ (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") - (commit - "dbc10e747428f31e5c84a2d9712af116ed6529b1") + (branch "master") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" diff --git a/aux/workflow/README.sh b/aux/workflow/README.sh index b9fa38e..8313274 100755 --- a/aux/workflow/README.sh +++ b/aux/workflow/README.sh @@ -5,7 +5,7 @@ mkdir -p public PROJECT_UC="$1" PROJECT="$2" -README="${3:-README.md}" +MAILING_LIST="$3" RELEASES_LIST="$(mktemp)" for version in $(git tag); do @@ -18,7 +18,20 @@ if [ -s "$RELEASES_LIST" ]; then cat "$RELEASES_LIST" >> "$RELEASES" fi -cat "$README" "$RELEASES" | \ +LINKS="$(mktemp)" +cat <<EOF > "$LINKS" + +# Links + +- [home page](https://$PROJECT.euandreh.xyz) +- [source code](https://git.euandreh.xyz/$PROJECT/about/) +- [bug tracking](https://$PROJECT.euandreh.xyz/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) +EOF + +cat "README.md" "$LINKS" "$RELEASES" | \ pandoc --toc \ --highlight-style pygments \ --toc-depth=2 \ diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index 5dbc761..00fef6f 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -7,10 +7,15 @@ export PROJECT_UC="$1" export PROJECT="$2" export MAILING_LIST="$3" -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/' +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/' -envsubst < aux/workflow/preamble.md | \ - printf '%s\n\n%s' "$(cat -)" "$(perl -pe "$REGEX" TODOs.md)" | \ +TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g' + +envsubst < aux/workflow/preamble.md | \ + printf '%s\n\n%s' \ + "$(cat -)" \ + "$(perl -pe "$TODOS_REGEX" TODOs.md | \ + perl -pe "$TAGS_REGEX")" | \ pandoc --toc \ --highlight-style pygments \ --toc-depth=2 \ diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh new file mode 100755 index 0000000..e9609c2 --- /dev/null +++ b/aux/workflow/commonmark.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -eu + +mkdir -p public + +PROJECT_UC="$1" +F="$2" + +pandoc --toc \ + --highlight-style pygments \ + --toc-depth=2 \ + -s \ + --metadata title="$PROJECT_UC - ${F%.*}" \ + --metadata lang=en \ + -r commonmark \ + -w html \ + < "$F" > "public/${F%.*}.html" diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh new file mode 100755 index 0000000..45fc30a --- /dev/null +++ b/aux/workflow/dist.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -eu + +DATE="$1" +VERSION="v$2" + +if git show "$VERSION" 1>/dev/null 2>/dev/null; then + echo "Version '$VERSION' already exists." + exit 1 +fi + +if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then + echo "Date '$DATE' is not up-to-date." + exit 1 +fi + +git tag "$VERSION" diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md index c6ae56e..7413f58 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/). +See also [$PROJECT.euandreh.xyz](https://$PROJECT.euandreh.xyz/) and [CI logs](https://$PROJECT.euandreh.xyz/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 new file mode 100644 index 0000000..4c90225 --- /dev/null +++ b/aux/workflow/public.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -eu + +PROJECT_UC="$1" +PROJECT="$2" +MAILING_LIST="$3" + +sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" +sh aux/workflow/README.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" + +if [ -f CHANGELOG.md ]; then + sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md +fi + +sh aux/ci/report.sh "$PROJECT" diff --git a/aux/workflow/style.css b/aux/workflow/style.css index ac0144c..d7935d0 100644 --- a/aux/workflow/style.css +++ b/aux/workflow/style.css @@ -3,10 +3,18 @@ background-color: #ccc; } - span.header-anchor { + div.header-anchor { opacity: 0.5; } + span.tag { + font-family: monospace; + font-size: 70%; + background-color: lightgray; + padding: 3px; + border-radius: 5px; + } + /* Replicate colors from: https://git.euandreh.xyz/dotfiles/tree/spacemacs.el?id=fcd9f9c4ef399d45d54927382dc1cdde251ebb0a#n866 |