Add a script for generating a list of contributors to paste in release notes

This commit is contained in:
Kamil Śliwak 2023-02-03 19:01:22 +01:00
parent 8b7879c7da
commit 89c4ee6942
2 changed files with 54 additions and 1 deletions

View File

@ -33,7 +33,9 @@
Set the target to the ``develop`` branch and the tag to the new version, e.g. ``v0.8.5``.
Include the following warning: ``**The release is still in progress and the binaries may not yet be available from all sources.**``.
Don't publish it yet - click the ``Save draft`` button instead.
- [ ] Thank voluntary contributors in the GitHub release notes (use ``git shortlog --summary --email v0.5.3..origin/develop``).
- [ ] Thank voluntary contributors in the GitHub release notes.
Use ``scripts/list_contributors.sh v<previous version>`` to get initial list of names.
Remove different variants of the same name manually before using the output.
- [ ] Check that all tests on the latest commit in ``develop`` are green.
- [ ] Click the ``Publish release`` button on the release page, creating the tag.
- [ ] Wait for the CI runs on the tag itself.

51
scripts/list_contributors.sh Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# Creates a list containing names of people who contributed to the project, for use
# in release notes. The names come from the author field on the commits between
# the current revision and the one specified as argument.
#
# Note that the output often requires extra manual processing to remove entries
# that refer to the same person (diacritics vs no diacritics, name vs nickname, etc.).
#
# Usage:
# <script name>.sh <revision>
#
# ------------------------------------------------------------------------------
# This file is part of solidity.
#
# solidity is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# solidity is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with solidity. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2023 solidity contributors.
#------------------------------------------------------------------------------
set -euo pipefail
script_dir=$(dirname "$0")
# shellcheck source=scripts/common.sh
source "${script_dir}/common.sh"
(( $# == 1)) || fail "Wrong number of arguments. Usage: $0 <revision>."
revision="$1"
# NOTE: Commas are removed from any names containing them. It would look confusing otherwise, given
# that the list is delimited by commas. Hopefully no contributor uses a comma as their nickname.
git shortlog --summary "${revision}..origin/develop" |
cut --field 2 |
tr --delete , |
sort |
uniq |
paste --serial --delimiter=, |
sed -e 's/,/, /g'