aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/assert-readme.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-13 14:25:15 -0300
committerEuAndreh <eu@euandre.org>2023-03-13 14:25:15 -0300
commit862271d704f1d096a26e0b3ff147b70ae94a64e3 (patch)
treecef7a195e779602beb9e951e6b7dbfabc69d5321 /aux/workflow/assert-readme.sh
parentgit mv src/xyz/euandreh/* src/org/euandre/ (diff)
downloadpackage-repository-862271d704f1d096a26e0b3ff147b70ae94a64e3.tar.gz
package-repository-862271d704f1d096a26e0b3ff147b70ae94a64e3.tar.xz
rm -rf aux/ po/
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/assert-readme.sh108
1 files changed, 0 insertions, 108 deletions
diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh
deleted file mode 100755
index 0a85221..0000000
--- a/aux/workflow/assert-readme.sh
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/sh
-set -eu
-
-if [ ! -e .git ]; then
- exit
-fi
-
-TLD="$(cat aux/tld.txt)"
-. aux/lib.sh
-
-while getopts 'n:m:' flag; do
- case "$flag" in
- n)
- PROJECT="$OPTARG"
- ;;
- m)
- MAILING_LIST="$OPTARG"
- ;;
- *)
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-assert_arg() {
- if [ -z "$1" ]; then
- echo "Missing $2" >&2
- exit 2
- fi
-}
-
-assert_arg "${PROJECT:-}" '-n PROJECT'
-assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST'
-
-EXPECTED="$(mkstemp)"
-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
-\`\`\`
-
-Send contributions to the [mailing list] via
-[\`git send-email\`](https://git-send-email.io/).
-
-
-## Links
-
-- [homepage](https://$TLD/$PROJECT/en/)
-- [source code](https://euandreh.xyz/$PROJECT.git/)
-- [bug tracking](https://$TLD/$PROJECT/TODOs.html)
-- [mailing list]
-- [CI logs](https://$TLD/$PROJECT/ci.html)
-- [CHANGELOG](https://$TLD/$PROJECT/en/CHANGELOG.html)
-
-[mailing list]: https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
-EOF
-
-RELEASES_LIST="$(mkstemp)"
-add_release() {
- DATE="$1"
- VVERSION="$2"
- echo "- [$VVERSION](https://euandreh.xyz/$PROJECT.git/commit/?id=$VVERSION) [$PROJECT-$VVERSION.tar.gz](https://euandreh.xyz/$PROJECT.git/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://euandreh.xyz/$PROJECT.git/snapshot/$PROJECT-$VVERSION.tar.gz.asc)) - $DATE" >> "$RELEASES_LIST"
-}
-
-for VVERSION in $(git tag); do
- DATE="$(git log -1 --format=%cd --date=short "$VVERSION")"
- add_release "$DATE" "$VVERSION"
-done
-
-# "$@" represents a list of tags to be also included in the verification.
-for VVERSION in "$@"; do
- if ! git tag | grep -qF "$VVERSION"; then
- DATE="$(date '+%Y-%m-%d')"
- add_release "$DATE" "$VVERSION"
- fi
-done
-
-if [ -s "$RELEASES_LIST" ]; then
- printf '\n\n## Releases\n\n' >> "$EXPECTED"
- sort -r "$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://euandreh.xyz/$PROJECT.git/tree/COPYING
-EOF
-
-if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then
- echo 'Wrong metadata at the end of README.md file'
- echo "See expected content at: $EXPECTED"
- exit 1
-fi