From 42d575fde1c62e6b617410f81ae625797934d2fd Mon Sep 17 00:00:00 2001 From: Anthony Spring Date: Wed, 1 Apr 2020 08:40:50 -0400 Subject: [PATCH] Fix issue when generating a template for helm3 where the chart version was not passed --- CHANGELOG.md | 9 ++++++++- VERSION | 2 +- cmd/template.go | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93fc9be..02d2568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). - None at this time. +## [0.3.1] - 2020-04-01 + +Fixes: + +- When generating a template the chart version was not properly provided for Helm3. + ## [0.3.0] - 2020-02-04 Breaking Changes: @@ -74,7 +80,8 @@ This example shows the `repo` has been omitted and the name pointing to a URL us - Initial release -[Unreleased]: https://github.com/traackr/binnacle/compare/v0.3.0...HEAD +[Unreleased]: https://github.com/traackr/binnacle/compare/v0.3.1...HEAD +[0.3.1]: https://github.com/traackr/binnacle/tree/0.3.1 [0.3.0]: https://github.com/traackr/binnacle/tree/0.3.0 [0.2.1]: https://github.com/traackr/binnacle/tree/0.2.1 [0.2.0]: https://github.com/traackr/binnacle/tree/0.2.0 diff --git a/VERSION b/VERSION index 0d91a54..9e11b32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/cmd/template.go b/cmd/template.go index f598637..000bf00 100644 --- a/cmd/template.go +++ b/cmd/template.go @@ -61,7 +61,7 @@ func templateCmdRun(args ...string) { if err != nil { log.Fatalf("unable to load configuration: %v", err) } - + var charts = c.Charts log.Debugf("Loaded %d charts.", len(charts)) @@ -154,6 +154,11 @@ func templateCmdRun(args ...string) { cmdArgs = append(cmdArgs, "--values") cmdArgs = append(cmdArgs, valuesFile) + + if len(chart.Version) > 0 { + cmdArgs = append(cmdArgs, "--version") + cmdArgs = append(cmdArgs, chart.Version) + } } cmdArgs = append(cmdArgs, args...)