feat: Automatically enable Helm v3 mode

Runs `helm version` in helmexec.New, and exposes a method on Interface to allow other packages to use the detected version. Preserves compatibility with previous HELMFILE_HELM3 mechanism.

Resolves #923
This commit is contained in:
Andrew Drake
2019-11-14 10:50:18 -08:00
committed by Andrew Drake
parent 43f1188325
commit c099f69d94
6 changed files with 42 additions and 20 deletions
+4
View File
@@ -157,6 +157,10 @@ func (helm *Helm) TemplateRelease(name, chart string, flags ...string) error {
return nil
}
func (helm *Helm) IsHelm3() bool {
return false
}
func (helm *Helm) sync(m *sync.Mutex, f func()) {
if m != nil {
m.Lock()