diff options
author | EuAndreh <eu@euandre.org> | 2021-06-07 21:42:08 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-07 21:42:08 -0300 |
commit | 849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4 (patch) | |
tree | da07e25e8538d952e6202793665a939f28083e3e /aux/workflow/assert-readme.sh | |
parent | Update link to project websites (diff) | |
download | euandre.org-849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4.tar.gz euandre.org-849ccbba56f7f12f983bcbb2a6cfdd04329fe2e4.tar.xz |
Update files under aux/
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/assert-readme.sh | 59 |
1 files changed, 59 insertions, 0 deletions
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 <<EOF >> "$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 <<EOF >> "$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 |