From: Thanh Ha Date: Fri, 30 Jun 2017 02:02:00 +0000 (-0400) Subject: grep: DO NOT return exit code 1 on no match X-Git-Tag: v0.4.2~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F5363%2F1;p=releng%2Fglobal-jjb.git grep: DO NOT return exit code 1 on no match This is causing build failures in OpenDaylight for our patches :( Change-Id: I1e5c90a0507756103e602a4fd298164b127189ec Signed-off-by: Thanh Ha --- diff --git a/shell/git-validate-jira-urls.sh b/shell/git-validate-jira-urls.sh index d44fec93..51d5132a 100644 --- a/shell/git-validate-jira-urls.sh +++ b/shell/git-validate-jira-urls.sh @@ -15,7 +15,7 @@ set -e -o pipefail set +u -JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io 'http[s]*://jira\..*') +JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io 'http[s]*://jira\..*' || true) if [[ ! -z "$JIRA_LINK" ]] then echo 'Remove JIRA URLs from commit message'