Skip to content

Commit

Permalink
chore: fix helm-testing versioning in publish-chart-yaml
Browse files Browse the repository at this point in the history
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 <blaise.dias@datacore.com>
  • Loading branch information
blaisedias authored and tiagolobocastro committed Dec 13, 2024
1 parent 076753a commit 3003146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helm/publish-chart-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,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
Expand Down

0 comments on commit 3003146

Please sign in to comment.