diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index ed1eb56857a467a735b2d29336835672e6db2e26..508e7774568911780d715aaa57c1834b17da1ca2 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -630,7 +630,7 @@ variables: } function maybe_install_poetry() { - if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry.* ]] && ! command -v poetry > /dev/null + if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry ]] && ! command -v poetry > /dev/null then # shellcheck disable=SC2086 pip install ${PIP_OPTS} "$PYTHON_BUILD_SYSTEM" @@ -684,7 +684,7 @@ variables: } function _run() { - if [[ "$PYTHON_BUILD_SYSTEM" == poetry* ]] + if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry ]] then maybe_install_poetry poetry run "$@" @@ -703,7 +703,7 @@ variables: } function py_package() { - if [[ "$PYTHON_BUILD_SYSTEM" == poetry* ]] + if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry ]] then maybe_install_poetry poetry build @@ -754,7 +754,7 @@ variables: fi # 2: bump-my-version (+ Git commit & tag) - if [[ "$PYTHON_BUILD_SYSTEM" == poetry* ]] + if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry ]] then maybe_install_poetry if [[ -z "$py_next_version" ]] @@ -812,7 +812,7 @@ variables: } function py_publish() { - if [[ "$PYTHON_BUILD_SYSTEM" == poetry* ]] + if [[ "$PYTHON_BUILD_SYSTEM" =~ ^poetry ]] then maybe_install_poetry