diff --git a/pkg/generate/helm.go b/pkg/generate/helm.go index 3d413a1..576384f 100644 --- a/pkg/generate/helm.go +++ b/pkg/generate/helm.go @@ -159,8 +159,8 @@ func (t *Templating) buildTemplatesDir() string { paths := []string{ "~/.bm/chart/user", "~/.bm/chart/.base", - "./generate/chart", // unit tests - "./chart", // unit tests + "./pkg/generate/chart", // unit tests + "./chart", // unit tests } for _, path := range paths { diff --git a/pkg/generate/templating.go b/pkg/generate/templating.go index bd7c6a4..77d27c3 100644 --- a/pkg/generate/templating.go +++ b/pkg/generate/templating.go @@ -120,8 +120,8 @@ func (t *Templating) RenderTemplate(name string, operation string, cfg *Computed func (t *Templating) findTemplateFile(filename string, operation string) string { paths := []string{ - "./generate/templates/" + operation + "/" + filename, // unit tests - "./templates/" + operation + "/" + filename, // unit tests + "./pkg/generate/templates/" + operation + "/" + filename, // unit tests + "./templates/" + operation + "/" + filename, // unit tests GetFilesHomePath() + "/templates/user/" + operation + "/" + filename, GetFilesHomePath() + "/templates/.base/" + operation + "/" + filename, } @@ -142,8 +142,8 @@ func (t *Templating) findTemplateFile(filename string, operation string) string // findTemplateDefinition is loading template definition JSON file in order - first from local files, then from BM_HOME path func (t *Templating) findTemplateDefinition(name string) (TemplateDefinition, error) { paths := []string{ - "./generate/templates/definition/" + name + ".json", // unit tests - "./templates/definition/" + name + ".json", // unit tests + "./pkg/generate/templates/definition/" + name + ".json", // unit tests + "./templates/definition/" + name + ".json", // unit tests GetFilesHomePath() + "/templates/user/definition/" + name + ".json", GetFilesHomePath() + "/templates/.base/definition/" + name + ".json", }