mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 09:33:41 +02:00
Use helm show chart to identify chart version
Signed-off-by: Felipe Santos <felipecassiors@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/Masterminds/semver/v3"
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
|
||||
"github.com/helmfile/helmfile/pkg/helmexec"
|
||||
)
|
||||
@@ -227,3 +228,12 @@ func (helm *Helm) sync(m *sync.Mutex, f func()) {
|
||||
|
||||
f()
|
||||
}
|
||||
|
||||
func (helm *Helm) ShowChart(chartPath string) (chart.Metadata, error) {
|
||||
switch chartPath {
|
||||
case "../../foo-bar":
|
||||
return chart.Metadata{Version: "3.2.0"}, nil
|
||||
default:
|
||||
return chart.Metadata{}, errors.New("fake test error")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user