From: Petr Špaček Date: Thu, 28 Oct 2021 14:39:20 +0000 (+0200) Subject: retain diff output if clang-format changes something X-Git-Tag: v9.17.20~15^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca4393fc9fe85d2e6b7012ebe6684d972d6e6c8f;p=thirdparty%2Fbind9.git retain diff output if clang-format changes something It's major PITA trying to guess what exactly clang-format has changed, so how CI stores patch file with changes which can be applied locally if needed. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d11ff416faf..8e8f056441e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -446,7 +446,13 @@ clang-format: needs: [] script: - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi + - git diff > clang-format.patch - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi + artifacts: + paths: + - clang-format.patch + expire_in: "1 week" + when: on_failure coccinelle: <<: *precheck_job