2020-01-06 06:37:21 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-02-25 00:10:10 +01:00
|
|
|
set -eo pipefail
|
2020-01-06 06:37:21 +01:00
|
|
|
|
2020-01-15 11:34:10 +01:00
|
|
|
antispam=", at the domain "
|
|
|
|
|
2020-01-15 09:33:32 +01:00
|
|
|
echo "All contributors:"
|
2020-01-15 11:34:10 +01:00
|
|
|
git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f | sed "s/@/$antispam/"
|
2020-01-15 09:33:32 +01:00
|
|
|
|
2020-01-06 06:37:21 +01:00
|
|
|
headAuthor=$(git log -1 --pretty=format:'%ae')
|
2020-01-15 11:34:10 +01:00
|
|
|
authorAt=$(echo "$headAuthor" | sed "s/@/$antispam/")
|
2020-02-27 03:52:00 +01:00
|
|
|
if git log --pretty=format:'%ae' CONTRIBUTORS | grep -i "$headAuthor" > /dev/null; then
|
2020-01-15 11:34:10 +01:00
|
|
|
echo "Author $authorAt found in CONTRIBUTORS"
|
2020-01-15 09:33:32 +01:00
|
|
|
else
|
2020-01-15 11:34:10 +01:00
|
|
|
echo "Author $authorAt NOT found in list"
|
2020-01-15 09:33:32 +01:00
|
|
|
exit 1
|
|
|
|
fi
|