From b1cc6061fd368b987d8b03e63cd06a1f792492e3 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Fri, 7 Jan 2022 23:39:55 +0100 Subject: [PATCH] support/scripts/generate-gitlab-ci-yml: ignore branch name prefix containing a single hyphen The commit [1] added a sed command used to retreive a pattern to keep only defconfigs whose name start with the pattern. "-defconfigs-" The sed command doesn't work as expected if contains a single hyphen [2]: "qemu-6.2.0-defconfigs-qemu" Update the sed command to ignore completely the part before "-defconfigs-". [1] 65d2f04c012af492a9b9da04dfa3b3cbd20347f1 [2] http://lists.busybox.net/pipermail/buildroot/2022-January/632507.html Signed-off-by: Romain Naour Cc: Thomas Petazzoni Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/scripts/generate-gitlab-ci-yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml index 3e0c68091b..bd79807914 100755 --- a/support/scripts/generate-gitlab-ci-yml +++ b/support/scripts/generate-gitlab-ci-yml @@ -66,8 +66,8 @@ gen_tests() { (*-defconfigs) do_defconfigs=base ;; - (*-defconfigs-*) - pattern=$(echo ${CI_COMMIT_REF_NAME} | sed 's%[^\-]*-defconfigs-\(.*\)%\1%') + (*-defconfigs-*) + pattern=$(echo ${CI_COMMIT_REF_NAME} | sed 's%^.*-defconfigs-\(.*\)%\1%') defconfigs=( $(cd configs; LC_ALL=C ls -1 | grep ^${pattern}) ) do_defconfigs=base ;;