浏览代码

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] 65d2f04c012af492a9b9da04dfa3b3cbd20347f1
[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>
Romain Naour 3 年之前
父节点
当前提交
b1cc6061fd
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      support/scripts/generate-gitlab-ci-yml

+ 2 - 2
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
             ;;