diff options
author | EuAndreh <eu@euandre.org> | 2021-06-11 22:39:20 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-11 22:39:20 -0300 |
commit | 3f9bd994223f78b7ec4ab80820d593066f27aa56 (patch) | |
tree | d656f616bf96354bc786ad6f8b9f74cb92d8561e /aux/workflow/assert-readme.sh | |
parent | aux/workflow/public.sh: Mark as executable (diff) | |
download | package-repository-3f9bd994223f78b7ec4ab80820d593066f27aa56.tar.gz package-repository-3f9bd994223f78b7ec4ab80820d593066f27aa56.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 |