From eba3b12bf53f3b58ed059f99a47c6c650ea24b5a Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Mon, 11 Jan 2021 17:26:04 +0100 Subject: [PATCH] cloud-infra: Fix dependency extraction script This fix ensures grep doesn't match the wrong word ref when the word ref is used in commit message and instead greps for "ref" as returned by curl. Change-Id: I4e283c524c114150ddb6d4149928348efabfc7d7 --- jjb/cloud-infra/scripts/generate-change-metadata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jjb/cloud-infra/scripts/generate-change-metadata.sh b/jjb/cloud-infra/scripts/generate-change-metadata.sh index e2c6a0f0d..cdaef3500 100755 --- a/jjb/cloud-infra/scripts/generate-change-metadata.sh +++ b/jjb/cloud-infra/scripts/generate-change-metadata.sh @@ -43,7 +43,7 @@ function determine_dependency() { echo "Info : Processing change $DEPENDENT_CHANGE_ID" declare -a DEPENDENT_CHANGE_METADATA readarray -t DEPENDENT_CHANGE_METADATA < <(curl -s "https://gerrit.nordix.org/changes/?q=$DEPENDENT_CHANGE_ID&o=CURRENT_REVISION" 2>&1 \ - | grep "project\|status\|current_revision\|ref.*," | sed -e 's/\s//g' -e 's/,//g' -e 's/"//g'| cut -d: -f2) + | grep "project\|status\|current_revision\|ref\".*," | sed -e 's/\s//g' -e 's/,//g' -e 's/"//g'| cut -d: -f2) # NOTE (fdegir): check if the dependeny change exists # and ignore if it doesn't -- 2.25.1