Skip to content

Fix regex in build_gdk_image script

What does this MR do and why?

Fix regex in build_gdk_image script

Test

It is easy to test this change locally:

Old regex

set -e

CI_MERGE_REQUEST_TARGET_BRANCH_NAME='17-4-stable-ee'
STABLE_BRANCH_PATTERN="^[\d-]+-stable-ee$"

if [[ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ $STABLE_BRANCH_PATTERN ]]; then
  echo "match"
fi
# Does not return anything
# bash w-dat-test-locally/test-regex.sh

New regex

set -e

CI_MERGE_REQUEST_TARGET_BRANCH_NAME='17-4-stable-ee'
STABLE_BRANCH_PATTERN="^[0-9-]+-stable-ee$"

if [[ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ $STABLE_BRANCH_PATTERN ]]; then
  echo "match"
fi
# bash w-dat-test-locally/test-regex.sh
match

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading