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>
This commit is contained in:
Dan Williams
2025-04-08 20:52:56 -05:00
parent bd9b98e2f1
commit be3c28f1a4
+2 -2
View File
@@ -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