From 7acb7e98961323df7294659accd81593caef3473 Mon Sep 17 00:00:00 2001 From: John Helmert III Date: Sun, 26 Apr 2020 00:57:07 -0500 Subject: [PATCH] Add get_authors.sh and update AUTHORS.rst --- AUTHORS.rst | 14 +++++++++++++- scripts/RELEASE_CHECKLIST.md | 1 - scripts/build_authors.sh | 31 +++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100755 scripts/build_authors.sh diff --git a/AUTHORS.rst b/AUTHORS.rst index 16b7bf0..90a4c16 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,5 +1,5 @@ ================ -RTV/TUIR Contributors +RTV Contributors ================ Thanks to the following people for their contributions to this project. @@ -60,3 +60,15 @@ Thanks to the following people for their contributions to this project. * `geheimnisse `_ * `Alexander Terry `_ * `peterpans01 `_ + +================= +TUIR Contributors +================= + +* `John Helmert III `_ +* `capnhawkbill `_ +* `armandg `_ +* `OKelt `_ +* `Francesco Turco `_ +* `John Helmert `_ +* `geeseven <2251985-geeseven@users.noreply.gitlab.com>`_ diff --git a/scripts/RELEASE_CHECKLIST.md b/scripts/RELEASE_CHECKLIST.md index 6c03051..1083cbe 100644 --- a/scripts/RELEASE_CHECKLIST.md +++ b/scripts/RELEASE_CHECKLIST.md @@ -4,7 +4,6 @@ Release Checklist 1. Switch to the master branch and stash/commit any uncommited changes. 2. Bump the version number in [tuir/\_\_version\_\_.py](tuir/__version__.py). 3. Update the release notes in the [CHANGELOG.rst](CHANGELOG.rst). - 4. Update the contributor list by running [``scripts/build_authors.py``](scripts/build_authors.py). 5. Re-generate the manpage by running [``scripts/build_manpage.py``](scripts/build_manpage.py). 6. Commit all changes to the correct branch and tag the correct commit with its version. diff --git a/scripts/build_authors.sh b/scripts/build_authors.sh new file mode 100755 index 0000000..5bad060 --- /dev/null +++ b/scripts/build_authors.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# TODO - this only links to users' emails, change this to linking to profiles +# like Michael's script + +ROOT="$(dirname $0)/.." +AUTHORS="${ROOT}/AUTHORS.rst" + +die() { + echo $@ + exit 1 +} + +[[ -f "${AUTHORS}" ]] || die "AUTHORS.rst doesn't exist in source dir" + +# Clean off the old list of contributors +sed -i '/TUIR Contributors/{n;n;Q}' ${AUTHORS} + +# Add new ones +# Get a list of the "Author" fields from the commits since I took over +# maintainence of TUIR, dedupe those and format for the AUTHORS.rst file +CONTRIBUTORS=$(git log v1.27.0..HEAD | + awk '$1 ~ /Author:/' | + awk '!a[$0]++' | + sed 's/Author: /* `/; s/$/`_/g') +# TODO - Surely there's a way to compress these awks and sed into a single +# command... + +# Add a space between the heading and contributors +echo "" >> ${AUTHORS} +echo "${CONTRIBUTORS}" >> ${AUTHORS}