aboutsummaryrefslogtreecommitdiff
path: root/aux/checks
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xaux/checks/changelog.sh54
-rwxr-xr-xaux/checks/manpages.sh21
-rw-r--r--aux/checks/manpages/footer.en.0.in30
-rw-r--r--aux/checks/manpages/footer.eo.0.in13
-rw-r--r--aux/checks/manpages/footer.es.0.in13
-rw-r--r--aux/checks/manpages/footer.fr.0.in13
-rw-r--r--aux/checks/manpages/footer.pt.0.in13
-rwxr-xr-xaux/checks/readme.sh82
-rwxr-xr-xaux/checks/repo.sh (renamed from aux/workflow/repocheck.sh)4
-rwxr-xr-xaux/checks/shellcheck.sh (renamed from aux/assert-shellcheck.sh)0
-rwxr-xr-xaux/checks/spelling.sh5
-rwxr-xr-xaux/checks/todos.sh (renamed from aux/workflow/assert-todos.sh)4
12 files changed, 252 insertions, 0 deletions
diff --git a/aux/checks/changelog.sh b/aux/checks/changelog.sh
new file mode 100755
index 0000000..ee10549
--- /dev/null
+++ b/aux/checks/changelog.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+set -eu
+
+
+while getopts 'h' flag; do
+ case "$flag" in
+ h)
+ usage
+ help
+ exit
+ ;;
+ *)
+ usage >&2
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+. aux/lib.sh
+
+
+HOMEPAGE_LINK="Changelog for [$NAME](https://$TLD/$NAME/en/)."
+
+if ! grep -qF "$HOMEPAGE_LINK" CHANGELOG.md; then
+ echo "Missing link to homepage in CHANGELOG.md:" >&2
+ echo "$HOMEPAGE_LINK"
+ exit 1
+fi
+
+assert() {
+ DATE="$1"
+ VVERSION="$2"
+ VERSION="${2#v}"
+ CHANGELOG_ENTRY="$(printf \
+ '# [%s](https://%s/git/%s/commit/?id=%s) - %s' \
+ "$VERSION" "$TLD" "$NAME" "$VVERSION" "$DATE")"
+ if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then
+ echo "Missing '$CHANGELOG_ENTRY' entry from CHANGELOG.md" >&2
+ exit 1
+ fi
+}
+
+for VVERSION in $(git tag); do
+ DATE="$(git log -1 --format=%ad --date=short "$VVERSION")"
+ assert "$DATE" "$VVERSION"
+done
+
+# FIXME
+# "$@" represents a list of tags to be also included in the verification.
+for VVERSION in "$@"; do
+ DATE="$(date '+%Y-%m-%d')"
+ assert "$DATE" "$VVERSION"
+done
diff --git a/aux/checks/manpages.sh b/aux/checks/manpages.sh
new file mode 100755
index 0000000..204d960
--- /dev/null
+++ b/aux/checks/manpages.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -eu
+
+while getopts 'h' flag; do
+ case "$flag" in
+ h)
+ usage
+ help
+ exit
+ ;;
+ *)
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+. aux/lib.sh
+
+
+# FIXME
diff --git a/aux/checks/manpages/footer.en.0.in b/aux/checks/manpages/footer.en.0.in
new file mode 100644
index 0000000..8db378b
--- /dev/null
+++ b/aux/checks/manpages/footer.en.0.in
@@ -0,0 +1,30 @@
+.SH AUTHORS
+
+.MT eu@euandre.org
+EuAndreh
+.ME
+and contributors.
+
+
+.SH BUGS
+
+.IP \(bu
+Report bugs to the
+.MT ~euandreh/@MAILING_LIST@@lists.sr.ht
+mailing list
+.ME .
+Use the subject "\f(CR[@NAME@] BUG or TASK:
+<description>\fR".
+.IP \(bu
+Browse bugs
+.UR https://@TLD@/@NAME@/TODOs.html
+online
+.UE .
+.IP \(bu
+.UR https://@TLD@/@NAME@/en/
+Homepage
+.UE .
+.IP \(bu
+.UR https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@NAME@%5D
+Comments and discussions
+.UE .
diff --git a/aux/checks/manpages/footer.eo.0.in b/aux/checks/manpages/footer.eo.0.in
new file mode 100644
index 0000000..bb319ca
--- /dev/null
+++ b/aux/checks/manpages/footer.eo.0.in
@@ -0,0 +1,13 @@
+.SH AUTHORS
+
+.MT eu@euandre.org EuAndreh .ME and contributors.
+
+
+.SH BUGS
+
+.IP \(bu Report bugs to the .MT ~euandreh/@MAILING_LIST@@lists.sr.ht mailing
+list .ME . Use the subject "\f(CR[@NAME@] BUG or TASK: <description>\fR".
+.IP \(bu Browse bugs .UR https://@TLD@/@NAME@/TODOs.html online .UE . .IP
+\(bu .UR https://@TLD@/@NAME@/en/ Homepage .UE . .IP \(bu .UR
+https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@NAME@%5D Comments
+and discussions .UE .
diff --git a/aux/checks/manpages/footer.es.0.in b/aux/checks/manpages/footer.es.0.in
new file mode 100644
index 0000000..bb319ca
--- /dev/null
+++ b/aux/checks/manpages/footer.es.0.in
@@ -0,0 +1,13 @@
+.SH AUTHORS
+
+.MT eu@euandre.org EuAndreh .ME and contributors.
+
+
+.SH BUGS
+
+.IP \(bu Report bugs to the .MT ~euandreh/@MAILING_LIST@@lists.sr.ht mailing
+list .ME . Use the subject "\f(CR[@NAME@] BUG or TASK: <description>\fR".
+.IP \(bu Browse bugs .UR https://@TLD@/@NAME@/TODOs.html online .UE . .IP
+\(bu .UR https://@TLD@/@NAME@/en/ Homepage .UE . .IP \(bu .UR
+https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@NAME@%5D Comments
+and discussions .UE .
diff --git a/aux/checks/manpages/footer.fr.0.in b/aux/checks/manpages/footer.fr.0.in
new file mode 100644
index 0000000..bb319ca
--- /dev/null
+++ b/aux/checks/manpages/footer.fr.0.in
@@ -0,0 +1,13 @@
+.SH AUTHORS
+
+.MT eu@euandre.org EuAndreh .ME and contributors.
+
+
+.SH BUGS
+
+.IP \(bu Report bugs to the .MT ~euandreh/@MAILING_LIST@@lists.sr.ht mailing
+list .ME . Use the subject "\f(CR[@NAME@] BUG or TASK: <description>\fR".
+.IP \(bu Browse bugs .UR https://@TLD@/@NAME@/TODOs.html online .UE . .IP
+\(bu .UR https://@TLD@/@NAME@/en/ Homepage .UE . .IP \(bu .UR
+https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@NAME@%5D Comments
+and discussions .UE .
diff --git a/aux/checks/manpages/footer.pt.0.in b/aux/checks/manpages/footer.pt.0.in
new file mode 100644
index 0000000..bb319ca
--- /dev/null
+++ b/aux/checks/manpages/footer.pt.0.in
@@ -0,0 +1,13 @@
+.SH AUTHORS
+
+.MT eu@euandre.org EuAndreh .ME and contributors.
+
+
+.SH BUGS
+
+.IP \(bu Report bugs to the .MT ~euandreh/@MAILING_LIST@@lists.sr.ht mailing
+list .ME . Use the subject "\f(CR[@NAME@] BUG or TASK: <description>\fR".
+.IP \(bu Browse bugs .UR https://@TLD@/@NAME@/TODOs.html online .UE . .IP
+\(bu .UR https://@TLD@/@NAME@/en/ Homepage .UE . .IP \(bu .UR
+https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@NAME@%5D Comments
+and discussions .UE .
diff --git a/aux/checks/readme.sh b/aux/checks/readme.sh
new file mode 100755
index 0000000..0447b08
--- /dev/null
+++ b/aux/checks/readme.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+set -eu
+
+while getopts 'h' flag; do
+ case "$flag" in
+ h)
+ usage
+ help
+ exit
+ ;;
+ *)
+ usage >&2
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+. aux/lib.sh
+
+
+EXPECTED="$(mkstemp)"
+cat <<-EOF >> "$EXPECTED"
+
+ Send contributions to the [mailing list] via
+ [\`git send-email\`](https://git-send-email.io/).
+
+
+ ## Links
+
+ - [homepage](https://$TLD/s/$NAME/en/)
+ - [source code](https://$TLD/git/$NAME/)
+ - [bug tracking](https://$TLD/s/$NAME/TODOs.html)
+ - [mailing list]
+ - [CI logs](https://$TLD/s/$NAME/ci/)
+ - [CHANGELOG](https://$TLD/s/$NAME/en/CHANGELOG.html)
+
+ [mailing list]: https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$NAME%5D
+EOF
+
+RELEASES_LIST="$(mkstemp)"
+add_release() {
+ DATE="$1"
+ VVERSION="$2"
+ echo "- [$VVERSION](https://$TLD/git/$NAME/commit/?id=$VVERSION) [$NAME-$VVERSION.tar.gz](https://$TLD/git/$NAME/snapshot/$NAME-$VVERSION.tar.gz) ([sig](https://$TLD/git/$NAME/snapshot/$NAME-$VVERSION.tar.gz.asc)) - $DATE" >> "$RELEASES_LIST"
+}
+
+for VVERSION in $(git tag); do
+ DATE="$(git log -1 --format=%ad --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://$TLD/git/$NAME/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
diff --git a/aux/workflow/repocheck.sh b/aux/checks/repo.sh
index 688410a..0c00e92 100755
--- a/aux/workflow/repocheck.sh
+++ b/aux/checks/repo.sh
@@ -1,6 +1,10 @@
#!/bin/sh
set -eu
+if true; then
+ exit
+fi
+
if [ -n "${RECURSIVE_CHECK:-}" ]; then
exit
fi
diff --git a/aux/assert-shellcheck.sh b/aux/checks/shellcheck.sh
index 40fd364..40fd364 100755
--- a/aux/assert-shellcheck.sh
+++ b/aux/checks/shellcheck.sh
diff --git a/aux/checks/spelling.sh b/aux/checks/spelling.sh
new file mode 100755
index 0000000..4368820
--- /dev/null
+++ b/aux/checks/spelling.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -eu
+
+echo FIXME
+exit
diff --git a/aux/workflow/assert-todos.sh b/aux/checks/todos.sh
index bc4907d..2b9a570 100755
--- a/aux/workflow/assert-todos.sh
+++ b/aux/checks/todos.sh
@@ -1,6 +1,10 @@
#!/bin/sh
set -eu
+if true; then
+ exit
+fi
+
if [ -e .git ] && git grep FIXME | grep -v '^TODOs.md' |
grep -v '^aux/workflow/assert-todos.sh'; then
echo "Found dangling FIXME markers on the project."