From 4d1f33f96d68198d2f20d49c24add7181476e9f0 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 23 Feb 2021 00:35:04 -0300 Subject: Update aux/workflow/ --- aux/workflow/README.sh | 17 +++++++++++++++-- aux/workflow/commonmark.sh | 17 +++++++++++++++++ aux/workflow/dist.sh | 17 +++++++++++++++++ aux/workflow/public.sh | 15 +++++++++++++++ 4 files changed, 64 insertions(+), 2 deletions(-) create mode 100755 aux/workflow/commonmark.sh create mode 100755 aux/workflow/dist.sh create mode 100644 aux/workflow/public.sh (limited to 'aux/workflow') 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 < "$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/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/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" -- cgit v1.2.3