2017-12-24 09:53:20 +03:00
#!/bin/sh
2021-01-27 15:37:10 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-12-24 09:53:20 +03:00
set -eu
2017-04-15 07:16:23 +03:00
2021-03-30 13:45:14 +03:00
tag = " $( git describe --abbrev= 0 --match 'v[0-9][0-9][0-9]' ) "
git-contrib: use 'git shortlog' command
Also, this drops Weblate (again) and dependabot from the contributers list.
Moreover, this makes the contributers sorted by git command, rather
than sort command. Then, the authors are sorted by their first name, e.g.
- before
Xiaotian Wu, Yuri Chornoivan, Yu Watanabe, Zbigniew Jędrzejewski-Szmek,
- after
Xiaotian Wu, Yu Watanabe, Yuri Chornoivan, Zbigniew Jędrzejewski-Szmek,
Suggested-by: Matteo Croce <teknoraver@meta.com>
2024-04-02 19:41:07 +03:00
git shortlog -s --group= author --group= trailer:Co-authored-by " ${ tag } .. " |
sed -e 's/^[[:space:]]*[0-9]*[[:space:]]*//; /Weblate/ d; /dependabot\[bot\]/ d; s/ / /g; s/--/-/g; s/.*/\0,/' |
tr '\n' ' ' | sed -e "s/^/Contributions from: /g" -e " s/,\s* $/\n/g " | fold -w 72 -s |
git-contrib: copypaste-friendly output
Format output in a manner that can be copypasted as-is to NEWS.
That is, with 8 spaces indentation and wrapped at 80 columns.
Before:
$ tools/git-contrib.sh
Ben Stockett,
Carl Lei,
Frantisek Sumsal,
Gibeom Gwon,
Hugo Osvaldo Barrera,
James Hilliard,
Jan Palus,
Lennart Poettering,
Luca Boccassi,
Luca BRUNO,
Mike Gilbert,
nassir90,
nl6720,
Raul Tambre,
Yegor Alexeyev,
Yu Watanabe,
Zbigniew Jędrzejewski-Szmek,
After:
Contributions from: Ben Stockett, Carl Lei, Frantisek Sumsal,
Gibeom Gwon, Hugo Osvaldo Barrera, James Hilliard, Jan Palus,
Lennart Poettering, Luca Boccassi, Luca BRUNO, Mike Gilbert,
nassir90, nl6720, Raul Tambre, Yegor Alexeyev, Yu Watanabe,
Zbigniew Jędrzejewski-Szmek
2021-07-17 19:49:20 +03:00
sed -e "s/^/ /g" -e " s/\s* $//g "