Message ID | 20220107223955.148266-1-romain.naour@smile.fr |
---|---|
State | Accepted |
Headers | show |
Series | support/scripts/generate-gitlab-ci-yml: ignore branch name prefix <foo> containing a single hyphen | expand |
On 07/01/2022 23:39, Romain Naour wrote: > 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> Applied to master, thanks. Regards, Arnout > --- > 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 > ;; >
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 ;;
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> --- support/scripts/generate-gitlab-ci-yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)