From f4b2c99a5da122f51e8f43fa7d538bd914e167ab Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Tue, 17 Jun 2025 19:20:28 -0300 Subject: [PATCH] gitlab: Refine meson-health failure catching - Add backslash to avoid dots being treated as wildcards by grep - Do not allow search-common-ancestor to fail silently anymore --- .gitlab/run_meson_health_diff.sh | 12 ++++++------ .gitlab/search-common-ancestor.sh | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitlab/run_meson_health_diff.sh b/.gitlab/run_meson_health_diff.sh index f16990465f..5c1bb53208 100644 --- a/.gitlab/run_meson_health_diff.sh +++ b/.gitlab/run_meson_health_diff.sh @@ -8,7 +8,7 @@ diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.p #List of commonly used utilities on Unix world #See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385 coreutils_list=" - .sh \ + \.sh \ 'sh' \ 'bash' \ '\[' \ @@ -128,7 +128,7 @@ coreutils_list=" for coreutil in $coreutils_list; do if echo "$diff" | grep -q "$coreutil"; then - found_coreutils="$found_coreutils $coreutil" + found_coreutils="$(echo "$found_coreutils $coreutil" | sed 's|\\||g')" fi done @@ -140,16 +140,16 @@ fi #Limited list of commonly used utilities on Windows world ntutils_list=" - .bat \ - .cmd \ - .ps1 \ + \.bat \ + \.cmd \ + \.ps1 \ 'cmd' \ 'powershell' " for ntutil in $ntutils_list; do if echo "$diff" | grep -q "$ntutil"; then - found_ntutils="$found_ntutils $ntutil" + found_ntutils="$(echo "$found_ntutils $ntutil" | sed 's|\\||g')" fi done diff --git a/.gitlab/search-common-ancestor.sh b/.gitlab/search-common-ancestor.sh index d6d66b6d8d..a79d45aa56 100644 --- a/.gitlab/search-common-ancestor.sh +++ b/.gitlab/search-common-ancestor.sh @@ -1,7 +1,5 @@ #!/bin/sh -set -e - ancestor_horizon=28 # days (4 weeks) # We need to add a new remote for the upstream target branch, since this script