From a8e653d789a40562c3a5940840594fe72336d808 Mon Sep 17 00:00:00 2001 From: Blaise Dias Date: Wed, 11 Dec 2024 15:11:22 +0000 Subject: [PATCH] chore: fix helm-testing versioning in publish-chart-yaml Replace hard coded patch and minor values of 0, with values derived from the chart version That way we get versions derived from chart/Chart.yaml, like 2.7.2-... instead of hard coded values like 2.7.0-... or 2.0.0-.... Signed-off-by: Blaise Dias --- scripts/helm/publish-chart-yaml.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/helm/publish-chart-yaml.sh b/scripts/helm/publish-chart-yaml.sh index dcda2d2f9..77c739de8 100755 --- a/scripts/helm/publish-chart-yaml.sh +++ b/scripts/helm/publish-chart-yaml.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - # On a new appTag, update the Chart.yaml which is used to publish the chart to the appropriate # version and appVersion. # For this first iteration version and appVersion in the Chart.yaml *MUST* point to the stable @@ -78,9 +77,9 @@ helm_testing_branch_version() { local latest_version="${release_branch#*release/}" if [[ "$latest_version" =~ ^[0-9]+$ ]]; then - latest_version=${latest_version}.0.0 + latest_version=${latest_version}.$(semver get minor ${CHART_VERSION}).$(semver get patch ${CHART_VERSION}) elif [[ "$latest_version" =~ ^[0-9]+.[0-9]+$ ]]; then - latest_version=${latest_version}.0 + latest_version=${latest_version}.$(semver get patch ${CHART_VERSION}) elif [[ "$latest_version" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then latest_version=${latest_version} else