From fa91beed17bfaa078e801478a7fa9fe529110b75 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Tue, 30 Apr 2019 21:08:39 +0200 Subject: [PATCH] ci: tweak 'modified' detection in clang-format job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf51e76..9742e2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -140,7 +140,7 @@ clang-format: script: - ./scripts/clang-format-all.sh # check if any files are now modified and error if yes - - (if git diff --name-only --diff-filter=M | grep '\..pp$'; then echo $'\n Some files are not properly formatted. You can use "./scripts/clang-format-all.sh".\n'; git diff --diff-filter=M; false; fi) + - (if [ -n "`git diff --name-only --diff-filter=M`" ]; then echo $'\n Some files are not properly formatted. You can use "./scripts/clang-format-all.sh".\n'; git diff --diff-filter=M; false; fi) bionic-test: <<: *test_deb_definition