From 723c232d7790aacd7d98c9fc22d0a042c3f360ae Mon Sep 17 00:00:00 2001 From: B&R Date: Wed, 1 Nov 2023 21:12:00 +0100 Subject: [PATCH] feat: Support for access tokens injected by the `Backup Maker Operator` just before the build starts / https://github.com/riotkit-org/backup-repository/issues/299 --- pkg/generate/helm.go | 4 ++-- pkg/generate/templating.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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", }