diff options
author | Dan Williams <dan@ioncontrol.co> | 2025-04-08 20:36:00 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-04-08 20:52:56 -0500 |
commit | be3c28f1a4672714bc887608f52aee2d2d0da5db (patch) | |
tree | 8c319b23626b04892e3f832a1c7e18802e1e6365 | |
parent | bd9b98e2f18b92c3e370a529ccf35170bcd10f52 (diff) |
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 <dan@ioncontrol.co>
-rw-r--r-- | .gitlab-ci.yml | 4 |
1 files 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 |