Skip to content

Commit

Permalink
bake: allow user functions in variables and vice-versa
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Mar 27, 2021
1 parent 83868a4 commit 2ca6218
Show file tree
Hide file tree
Showing 5 changed files with 467 additions and 162 deletions.
7 changes: 7 additions & 0 deletions bake/bake.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ type Variable struct {
Default *hcl.Attribute `json:"default,omitempty" hcl:"default,optional"`
}

type Function struct {
Name string `json:"-" hcl:"name,label"`
Params *hcl.Attribute `json:"params,omitempty" hcl:"params"`
Variadic *hcl.Attribute `json:"variadic_param,omitempty" hcl:"variadic_params"`
Result *hcl.Attribute `json:"result,omitempty" hcl:"result"`
}

type Group struct {
Name string `json:"-" hcl:"name,label"`
Targets []string `json:"targets" hcl:"targets"`
Expand Down
Loading

0 comments on commit 2ca6218

Please sign in to comment.