From 95056049e7ee8239b6358def7c594e7002036574 Mon Sep 17 00:00:00 2001
From: "S.Thiriet" <thisamu@hotmail.com>
Date: Thu, 3 Oct 2024 20:29:05 +0000
Subject: [PATCH] fix: Poetry Build system test

---
 templates/gitlab-ci-python.yml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index ed1eb56..508e777 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
  
-- 
GitLab