From 9201487a6faa4386fe2e27089d898d9d4324a77e Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 29 Jun 2017 22:02:00 -0400 Subject: [PATCH] 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 --- shell/git-validate-jira-urls.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- 2.16.6