From 117243bd325ee2ad9ac8f5ba2c5f2ce85fd75d57 Mon Sep 17 00:00:00 2001 From: Dantali0n <info@dantalion.nl> Date: Wed, 25 Oct 2023 16:21:37 +0200 Subject: [PATCH] Restore format patch, --exit-code unkown option --- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index 1fbc214..93d9e58 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -40,7 +40,10 @@ format: script: - scripts/format-cpp.sh - scripts/format-cmake.sh - - git diff --exit-code 1 + - git diff > format.patch + # Fail when the patch is not empy (note ! can't be used directly.) + - (! grep -q '^--- a' format.patch) + artifacts: when: on_failure paths: -- GitLab