aboutsummaryrefslogtreecommitdiff
path: root/contrib/cirrus/success.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-09-20 11:49:07 -0400
committerChris Evich <cevich@redhat.com>2019-09-20 12:31:56 -0400
commitbabe201dae730032ee0a9435e55e09245782000a (patch)
treea0de41fb9673dc19997bce92e590ff46e08416f8 /contrib/cirrus/success.sh
parent93869eb5005370ad8b24c3195d8c1b9a3282e27a (diff)
downloadpodman-babe201dae730032ee0a9435e55e09245782000a.tar.gz
podman-babe201dae730032ee0a9435e55e09245782000a.tar.bz2
podman-babe201dae730032ee0a9435e55e09245782000a.zip
Cirrus: Fix success script
Fixed a typo. Also script was grabbing quotes and other non-email-address junk while looping. Filter before and after to make sure we get 'em all. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/success.sh')
-rwxr-xr-xcontrib/cirrus/success.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
index 30d375d95..8a9618b91 100755
--- a/contrib/cirrus/success.sh
+++ b/contrib/cirrus/success.sh
@@ -18,18 +18,21 @@ then
then
SHARANGE="${CIRRUS_BASE_SHA}..${CIRRUS_CHANGE_IN_REPO}"
EXCLUDE_RE='merge-robot'
+ EMAILCSET='[:alnum:]-+_@.'
AUTHOR_NICKS=$(egrep -v '(^[[:space:]]*$)|(^[[:space:]]*#)' "$AUTHOR_NICKS_FILEPATH" | sort -u)
# Depending on branch-state, it's possible SHARANGE could be _WAY_ too big
MAX_NICKS=10
# newline separated
GITLOG="git log --format='%ae'"
- COMMIT_AUTHORS=$($GITLOGt $SHARANGE || $GITLOG -1 HEAD | \
+ COMMIT_AUTHORS=$($GITLOG $SHARANGE || $GITLOG -1 HEAD | \
sort -u | \
egrep -v "$EXCLUDE_RE" | \
+ tr --delete --complement "$EMAILCSET[:space:]" | \
tail -$MAX_NICKS)
for c_email in $COMMIT_AUTHORS
do
+ c_email=$(echo "$c_email" | tr --delete --complement "$EMAILCSET")
echo -e "\tExamining $c_email"
NICK=$(echo "$AUTHOR_NICKS" | grep -m 1 "$c_email" | \
awk --field-separator ',' '{print $2}' | tr -d '[[:blank:]]')