From be3c28f1a4672714bc887608f52aee2d2d0da5db Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 8 Apr 2025 20:36:00 -0500 Subject: [PATCH] ci: fix DCO check yet again The script was combining all commit messages into one due to the quoting of "${COMMIT}", rather than leaving unquoted and picking each individual commit from the space separated string. Signed-off-by: Dan Williams --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7815b8de..ca4c1ef6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,9 +80,9 @@ verify-dco: script: | if [[ -n "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" ]]; then export COMMITS=$(git log --no-merges --format="%H" ${CI_MERGE_REQUEST_DIFF_BASE_SHA}.. | xargs) - for c in "${COMMITS}"; do + for c in ${COMMITS}; do $(git log --format="%b" -1 ${c} | grep -q "^Signed-off-by: .* <.*@.*>") && rc="$?" || rc="$?" - if [[ rc -eq 1 ]]; then + if [[ $rc -ne 0 ]]; then echo "Commit ${c} failed DCO Signed-off-by check" exit ${rc} fi