Add get_authors.sh and update AUTHORS.rst

This commit is contained in:
John Helmert III
2020-04-26 00:57:07 -05:00
parent 4e00011c78
commit 7acb7e9896
3 changed files with 44 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
================ ================
RTV/TUIR Contributors RTV Contributors
================ ================
Thanks to the following people for their contributions to this project. 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 <https://github.com/geheimnisse>`_ * `geheimnisse <https://github.com/geheimnisse>`_
* `Alexander Terry <https://github.com/mralext20>`_ * `Alexander Terry <https://github.com/mralext20>`_
* `peterpans01 <https://github.com/peterpans01>`_ * `peterpans01 <https://github.com/peterpans01>`_
=================
TUIR Contributors
=================
* `John Helmert III <jchelmertt3@gmail.com>`_
* `capnhawkbill <captain@stoarmfugel.localdomain>`_
* `armandg <armandg@gmail.com>`_
* `OKelt <oakelton@gmail.com>`_
* `Francesco Turco <fturco@fastmail.fm>`_
* `John Helmert <jchelmertt3@gmail.com>`_
* `geeseven <2251985-geeseven@users.noreply.gitlab.com>`_

View File

@@ -4,7 +4,6 @@ Release Checklist
1. Switch to the master branch and stash/commit any uncommited changes. 1. Switch to the master branch and stash/commit any uncommited changes.
2. Bump the version number in [tuir/\_\_version\_\_.py](tuir/__version__.py). 2. Bump the version number in [tuir/\_\_version\_\_.py](tuir/__version__.py).
3. Update the release notes in the [CHANGELOG.rst](CHANGELOG.rst). 3. Update the release notes in the [CHANGELOG.rst](CHANGELOG.rst).
<!-- TODO: Fix the build_authors script. For now it is good enough to edit manually. -->
4. Update the contributor list by running [``scripts/build_authors.py``](scripts/build_authors.py). 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). 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. 6. Commit all changes to the correct branch and tag the correct commit with its version.

31
scripts/build_authors.sh Executable file
View File

@@ -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}