Skip to content

Commit 5585b05

Browse files
committed
MAINT: Add script to update mailmap
1 parent 5a0d774 commit 5585b05

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tools/update_mailmap.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# usage -> bash update_mailmap.sh <previous-release>
4+
# by default, will use the latest tag
5+
6+
set -ux
7+
8+
ROOT=$( git rev-parse --show-toplevel )
9+
MAILMAP=$ROOT/.mailmap
10+
11+
LAST=$(git describe --tags `git rev-list --tags --max-count=1`)
12+
RELEASE=${1:-$LAST}
13+
14+
IFS=$'\n'
15+
for NAME in $(git shortlog -nse $RELEASE.. | cut -f2-); do
16+
echo $NAME
17+
done
18+
19+
# sort and write
20+
sort $MAILMAP > .tmpmailmap
21+
cp .tmpmailmap $MAILMAP
22+
rm .tmpmailmap

0 commit comments

Comments
 (0)