grep: DO NOT return exit code 1 on no match 63/5363/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 30 Jun 2017 02:02:00 +0000 (22:02 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 30 Jun 2017 02:03:05 +0000 (22:03 -0400)
This is causing build failures in OpenDaylight for our patches :(

Change-Id: I1e5c90a0507756103e602a4fd298164b127189ec
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
shell/git-validate-jira-urls.sh

index d44fec9..51d5132 100644 (file)
@@ -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'