feat: add .yml extension support (#575)

Resolves #565
This commit is contained in:
Andrey Afoninsky 2019-05-06 17:26:51 +03:00 committed by KUOKA Yusuke
parent 9a820d7bf2
commit 0ea5960ef2
1 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,10 @@ import (
"path/filepath" "path/filepath"
"sort" "sort"
"syscall" "syscall"
"github.com/roboll/helmfile/helmexec"
"github.com/roboll/helmfile/state"
"go.uber.org/zap"
) )
type App struct { type App struct {
@ -286,11 +290,11 @@ func (a *App) findDesiredStateFiles(specifiedPath string) ([]string, error) {
} else if defaultFile != "" { } else if defaultFile != "" {
return []string{defaultFile}, nil return []string{defaultFile}, nil
} else { } 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 { if err != nil {
return []string{}, err return []string{}, err
} }