basic anti spam protection

This commit is contained in:
Damien Elmes 2020-01-15 20:34:10 +10:00
parent 967b8a038d
commit c6d0425020

View file

@ -2,13 +2,16 @@
set -e set -e
antispam=", at the domain "
echo "All contributors:" echo "All contributors:"
git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f | sed "s/@/$antispam/"
headAuthor=$(git log -1 --pretty=format:'%ae') headAuthor=$(git log -1 --pretty=format:'%ae')
authorAt=$(echo "$headAuthor" | sed "s/@/$antispam/")
if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then
echo "Author $headAuthor found in CONTRIBUTORS" echo "Author $authorAt found in CONTRIBUTORS"
else else
echo "Author $headAuthor NOT found in list" echo "Author $authorAt NOT found in list"
exit 1 exit 1
fi fi