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