diff options
author | EuAndreh <eu@euandre.org> | 2021-06-16 23:00:20 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-16 23:00:20 -0300 |
commit | 993e0e15eb9691bc73e502e0003fa799650862e3 (patch) | |
tree | fbba2173783f55445ddd7c7e24f652db6936016d /aux/workflow/assert-readme.sh | |
parent | README.md: Highlight link as anchor instead of text (diff) | |
download | package-repository-993e0e15eb9691bc73e502e0003fa799650862e3.tar.gz package-repository-993e0e15eb9691bc73e502e0003fa799650862e3.tar.xz |
aux/: Update
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/assert-readme.sh | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh index cef75dd..2e5d978 100755 --- a/aux/workflow/assert-readme.sh +++ b/aux/workflow/assert-readme.sh @@ -5,6 +5,8 @@ mkdir -p public PROJECT="$1" MAILING_LIST="$2" +shift +shift TLD="$(cat aux/tld.txt)" EXPECTED="$(mktemp)" @@ -22,25 +24,45 @@ and for generating the documentation HTML and website, run: $ make public \`\`\` +Send contributions to the [mailing list] via [\`git send-email\`](https://git-send-email.io/). + ## Links -- [home page](https://$TLD/$PROJECT/) +- [homepage](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) +- [mailing list] - [CI logs](https://$TLD/$PROJECT/ci.html) - [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html) + +[mailing list]: https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D 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" +add_release() { + DATE="$1" + VVERSION="$2" + echo "- version [$VVERSION](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz.asc)), released in $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. +# shellcheck disable=2068 +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" - cat "$RELEASES_LIST" >> "$EXPECTED" + sort -r "$RELEASES_LIST" >> "$EXPECTED" fi cat <<EOF >> "$EXPECTED" @@ -50,10 +72,11 @@ cat <<EOF >> "$EXPECTED" 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 +[AGPL-3.0-or-later]: https://git.euandreh.xyz/$PROJECT/tree/COPYING EOF if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then - echo 'Missing metadata at the end of README.md file' + echo 'Wrong metadata at the end of README.md file' + echo "See expected content at: $EXPECTED" exit 1 fi |