support/scripts/generate-gitlab-ci-yml: ignore branch name prefix <foo> 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.

"<foo>-defconfigs-<pattern>"

The sed command doesn't work as expected if <foo> contains a
single hyphen [2]:

"qemu-6.2.0-defconfigs-qemu"

Update the sed command to ignore completely the part before
"-defconfigs-".

[1] 65d2f04c01
[2] http://lists.busybox.net/pipermail/buildroot/2022-January/632507.html

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Romain Naour 2022-01-07 23:39:55 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent b7244efa82
commit b1cc6061fd

View File

@ -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
;;