feat: add .yml extension support (#575)

Resolves #565
This commit is contained in:
Andrey Afoninsky
2019-05-06 23:26:51 +09:00
committed by KUOKA Yusuke
parent 9a820d7bf2
commit 0ea5960ef2
+6 -2
View File
@@ -14,6 +14,10 @@ import (
"path/filepath"
"sort"
"syscall"
"github.com/roboll/helmfile/helmexec"
"github.com/roboll/helmfile/state"
"go.uber.org/zap"
)
type App struct {
@@ -286,11 +290,11 @@ func (a *App) findDesiredStateFiles(specifiedPath string) ([]string, error) {
} else if defaultFile != "" {
return []string{defaultFile}, nil
} else {
return []string{}, fmt.Errorf("no state file found. It must be named %s/*.yaml, %s, or %s, or otherwise specified with the --file flag", DefaultHelmfileDirectory, DefaultHelmfile, DeprecatedHelmfile)
return []string{}, fmt.Errorf("no state file found. It must be named %s/*.{yaml,yml}, %s, or %s, or otherwise specified with the --file flag", DefaultHelmfileDirectory, DefaultHelmfile, DeprecatedHelmfile)
}
}
files, err := a.glob(filepath.Join(helmfileDir, "*.yaml"))
files, err := a.glob(filepath.Join(helmfileDir, "*.y*ml"))
if err != nil {
return []string{}, err
}