Skip to content

Commit

Permalink
Merge pull request #61 from syntasso/ab/friday-fixes
Browse files Browse the repository at this point in the history
fix: create valid workflows for plain promise init
  • Loading branch information
abangser authored Oct 14, 2024
2 parents d33c8b3 + 9d57553 commit 3e979b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/init_promise.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ type promiseTemplateValues struct {
Singular string
SubCommand string
ResourceConfigure string
PromiseConfigure string
CRDSchema string
}

func InitPromise(cmd *cobra.Command, args []string) error {
promiseName := args[0]

templateValues := generateTemplateValues(promiseName, "promise", "", "")
templateValues := generateTemplateValues(promiseName, "promise", "[]", "")

templates := map[string]string{
resourceFileName: fmt.Sprintf("templates/promise/%s.tpl", resourceFileName),
Expand Down Expand Up @@ -98,6 +99,7 @@ func generateTemplateValues(promiseName, subCommand, resourceConfigure, crdSchem
Singular: strings.ToLower(kind),
SubCommand: subCommand,
ResourceConfigure: resourceConfigure,
PromiseConfigure: "[]",
CRDSchema: crdSchema,
}
}
1 change: 1 addition & 0 deletions cmd/templates/promise/promise.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ spec:
workflows:
promise:
configure:
{{ .PromiseConfigure | indent 8 }}
resource:
configure:
{{ .ResourceConfigure | indent 8 }}

0 comments on commit 3e979b6

Please sign in to comment.