From 39b62d16536cbb939da82fdb2718bbabdcea5872 Mon Sep 17 00:00:00 2001
From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
Date: Mon, 17 Feb 2025 16:06:06 +0100
Subject: [PATCH] ci: instructions on how to run the license check

---
 .gitlab-ci.yml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2dd1ab..cc817da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,9 +58,17 @@ workflow:
         - ${PRE_COMMIT_HOME}
 
 Check licenses:
-  extends: .common_pre_commit
+  extends:
+    - .colorized
+    - .common_pre_commit
   script:
-    - pre-commit run --color=always --hook-stage manual reuse
+    - |
+      # pre-commit run --hook-stage manual reuse
+      pre-commit run --color=always --hook-stage manual reuse || {
+        printf "${RED}You can reproduce this check locally with \`pre-commit run --hook-stage manual reuse\`.
+      See also ${CI_PROJECT_URL}/-/blob/${CI_DEFAULT_BRANCH}/CONTRIBUTING.md#coding-style.\n${DEFAULT}"
+        exit 1
+      }
   rules:
     - if: $CI_PIPELINE_SOURCE == "web"
       when: manual
-- 
GitLab