diff options
author | EuAndreh <eu@euandre.org> | 2021-01-27 14:02:07 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-01-27 14:02:28 -0300 |
commit | f19c14c2d014ff9aa4bb1bd8e2c186effe6dbdab (patch) | |
tree | a557f15d828953ff086a36cadeef98ebb5918705 /aux/workflow/README.sh | |
parent | Update shared README.sh (diff) | |
download | toph-f19c14c2d014ff9aa4bb1bd8e2c186effe6dbdab.tar.gz toph-f19c14c2d014ff9aa4bb1bd8e2c186effe6dbdab.tar.xz |
mv build-aux/ aux/
Diffstat (limited to 'aux/workflow/README.sh')
-rwxr-xr-x | aux/workflow/README.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/aux/workflow/README.sh b/aux/workflow/README.sh new file mode 100755 index 0000000..49b1e8d --- /dev/null +++ b/aux/workflow/README.sh @@ -0,0 +1,29 @@ +#!/bin/sh +set -eu + +mkdir -p public + +PROJECT_UC="$1" +PROJECT="$2" + +RELEASES_LIST="$(mktemp)" +for version in $(git tag); do + echo "- version [$version](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz), released in $(git log -1 --format=%cd --date=short "$version")" >> "$RELEASES_LIST" +done + +RELEASES="$(mktemp)" +if [ -s "$RELEASES_LIST" ]; then + printf '\n# Releases\n\n' >> "$RELEASES" + cat "$RELEASES_LIST" >> "$RELEASES" +fi + +cat README.md "$RELEASES" | \ + pandoc --toc \ + --highlight-style pygments \ + --toc-depth=2 \ + -s \ + --metadata title="$PROJECT_UC - README" \ + --metadata lang=en \ + -r markdown \ + -w html \ + > public/index.html |