From 3f9bd994223f78b7ec4ab80820d593066f27aa56 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 11 Jun 2021 22:39:20 -0300 Subject: Update files under aux/ --- aux/workflow/assert-readme.sh | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 aux/workflow/assert-readme.sh (limited to 'aux/workflow/assert-readme.sh') diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh new file mode 100755 index 0000000..cef75dd --- /dev/null +++ b/aux/workflow/assert-readme.sh @@ -0,0 +1,59 @@ +#!/bin/sh +set -eu + +mkdir -p public + +PROJECT="$1" +MAILING_LIST="$2" +TLD="$(cat aux/tld.txt)" + +EXPECTED="$(mktemp)" +cat <> "$EXPECTED" + +For running the extra development-only checks, run: + +\`\`\`shell +$ make dev-check +\`\`\` + +and for generating the documentation HTML and website, run: + +\`\`\`shell +$ make public +\`\`\` + + +## Links + +- [home page](https://$TLD/$PROJECT/) +- [source code](https://git.euandreh.xyz/$PROJECT/) +- [bug tracking](https://$TLD/$PROJECT/TODOs.html) +- [mailing list](https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D) +- [CI logs](https://$TLD/$PROJECT/ci.html) +- [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html) +EOF + +RELEASES_LIST="$(mktemp)" +for version in $(git tag | perl -e 'print reverse <>'); do + echo "- version [$version](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz.asc)), released in $(git log -1 --format=%cd --date=short "$version")" >> "$RELEASES_LIST" +done + +if [ -s "$RELEASES_LIST" ]; then + printf '\n\n## Releases\n\n' >> "$EXPECTED" + cat "$RELEASES_LIST" >> "$EXPECTED" +fi + +cat <> "$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). + +[AGPL-3.0-or-later]: https://www.gnu.org/licenses/agpl-3.0.en.html +EOF + +if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then + echo 'Missing metadata at the end of README.md file' + exit 1 +fi -- cgit v1.2.3