aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow
diff options
context:
space:
mode:
Diffstat (limited to 'aux/workflow')
-rwxr-xr-xaux/workflow/README.sh17
-rwxr-xr-xaux/workflow/commonmark.sh17
-rwxr-xr-xaux/workflow/dist.sh17
-rw-r--r--aux/workflow/public.sh15
4 files changed, 64 insertions, 2 deletions
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/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"