From 1ee2dc1e4acda179859f6afb4016b34a868792f3 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Sun, 14 Apr 2024 18:41:03 +0200
Subject: [PATCH] ci: fix bumpversion regex + latest version

---
 bumpversion.sh                      | 2 +-
 templates/gitlab-ci-sonar-vault.yml | 2 +-
 templates/gitlab-ci-sonar.yml       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bumpversion.sh b/bumpversion.sh
index ed44d7b..329e866 100755
--- a/bumpversion.sh
+++ b/bumpversion.sh
@@ -33,7 +33,7 @@ if [[ "$curVer" ]]; then
   # replace in template and variants
   for tmpl in templates/*.yml
   do
-    sed -e "s/command: *\[\"--service\", \"\(.*\)\", \"$curVer\"\]/command: [\"--service\", \"\1\", \"$nextVer\"]/" "$tmpl" > "$tmpl.next"
+    sed -e "s/command: *\[ *\"--service\", *\"\(.*\)\", *\"$curVer\" *\]/command: [\"--service\", \"\1\", \"$nextVer\"]/" "$tmpl" > "$tmpl.next"
     mv -f "$tmpl.next" "$tmpl"
   done
 else
diff --git a/templates/gitlab-ci-sonar-vault.yml b/templates/gitlab-ci-sonar-vault.yml
index 11c850c..ccfcca4 100644
--- a/templates/gitlab-ci-sonar-vault.yml
+++ b/templates/gitlab-ci-sonar-vault.yml
@@ -22,7 +22,7 @@ variables:
 sonar:
   services:
     - name: "$TBC_TRACKING_IMAGE"
-      command: ["--service", "sonar", "4.1.1" ]
+      command: ["--service", "sonar", "4.2.2"]
     - name: "$TBC_VAULT_IMAGE"
       alias: "vault-secrets-provider"
   variables:
diff --git a/templates/gitlab-ci-sonar.yml b/templates/gitlab-ci-sonar.yml
index 15abcbb..d7f36e4 100644
--- a/templates/gitlab-ci-sonar.yml
+++ b/templates/gitlab-ci-sonar.yml
@@ -384,7 +384,7 @@ sonar:
     entrypoint: [""]
   services:
     - name: "$TBC_TRACKING_IMAGE"
-      command: ["--service", "sonar", "4.1.1" ]
+      command: ["--service", "sonar", "4.2.2"]
   variables:
     # see: https://docs.sonarqube.org/latest/analysis/gitlab-integration/#header-4
     SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
-- 
GitLab