From d1f881d7b4c8cd89e92118ea93b40f5e8a720943 Mon Sep 17 00:00:00 2001 From: pasta Date: Tue, 12 Mar 2024 12:21:22 -0500 Subject: [PATCH] ci: fail clang-diff-format on failure --- .github/workflows/clang-diff-format.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-diff-format.yml b/.github/workflows/clang-diff-format.yml index da88dcbb83..f59967c22c 100644 --- a/.github/workflows/clang-diff-format.yml +++ b/.github/workflows/clang-diff-format.yml @@ -13,5 +13,12 @@ jobs: - name: Fetch git run: git fetch - name: Run Clang-Format-Diff.py - run: git diff -U0 origin/develop -- . ':(exclude)src/qt/dashstrings.cpp' ':(exclude)src/qt/locale/' | ./contrib/devtools/clang-format-diff.py -p1 - + run: | + git diff -U0 origin/develop -- . ':(exclude)src/qt/dashstrings.cpp' ':(exclude)src/qt/locale/' | ./contrib/devtools/clang-format-diff.py -p1 > diff_output.txt + if [ -s diff_output.txt ]; then + echo "Clang format differences found:" + cat diff_output.txt + exit 1 + else + echo "No Clang format differences found." + fi