diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2018-12-10 14:30:14 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2018-12-10 14:35:22 +0100 |
commit | 79608cdc169b5da7ddcfa70fd5faf1e1e399d2f7 (patch) | |
tree | c1b86e12ba0412bba696a8335d03cd6f53013e63 /contrib/extract-authors.sh | |
parent | da2b31c1bc1caed3451b90c47d47cf9fd1326a11 (diff) |
AUTHORS: auto-generate from commit log
I tend to forget to update the AUTHORS file with new contributors. Let's
automate it and extract the contributors from the commit log.
Manually mention people how have contributed in other ways (bug reports,
documentation etc.) or how had commits in the previousl, no longer
existing repository.
Script based on
https://github.com/cilium/cilium/blob/master/contrib/scripts/extract_authors.sh
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'contrib/extract-authors.sh')
-rwxr-xr-x | contrib/extract-authors.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/extract-authors.sh b/contrib/extract-authors.sh new file mode 100755 index 0000000..486e906 --- /dev/null +++ b/contrib/extract-authors.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Based on +# https://github.com/cilium/cilium/blob/master/contrib/scripts/extract_authors.sh + +function extract_authors() { + authors=$(git shortlog --summary | awk '{$1=""; print $0}' | sed -e 's/^ //') + IFS=$'\n' + for i in $authors; do + name=$(git log --use-mailmap --author="$i" --format="%aN" | head -1) + mail=$(git log --use-mailmap --author="$i" --format="%aE" | head -1) + printf ' * %s <%s>\n' "$name" "$mail" + done +} + +extract_authors | uniq | sort |