Skip to content

Commit

Permalink
add optional to BuilderConfigOrderGroup struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Wigmore authored and ryanmoran committed Mar 11, 2021
1 parent f6fcb4c commit 88236e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cargo/jam/internal/builder_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ type BuilderConfigOrder struct {
}

type BuilderConfigOrderGroup struct {
ID string `toml:"id"`
Version string `toml:"version"`
ID string `toml:"id"`
Version string `toml:"version"`
Optional bool `toml:"optional,omitempty"`
}
type BuilderConfigStack struct {
ID string `toml:"id"`
Expand Down
6 changes: 4 additions & 2 deletions cargo/jam/internal/builder_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ description = "Some description"
[[order.group]]
id = "some-repository/some-buildpack-id"
version = "0.0.10"
optional = true
[stack]
id = "io.paketo.stacks.some-stack"
Expand Down Expand Up @@ -96,8 +97,9 @@ description = "Some description"
{
Group: []internal.BuilderConfigOrderGroup{
{
ID: "some-repository/some-buildpack-id",
Version: "0.0.10",
ID: "some-repository/some-buildpack-id",
Version: "0.0.10",
Optional: true,
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions cargo/jam/update_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ description = "Some description"
[[order.group]]
id = "some-repository/some-buildpack-id"
version = "0.0.10"
optional = true
[stack]
id = "io.paketo.stacks.some-stack"
Expand Down Expand Up @@ -185,6 +186,7 @@ description = "Some description"
[[order.group]]
id = "some-repository/some-buildpack-id"
version = "0.20.12"
optional = true
[stack]
id = "io.paketo.stacks.some-stack"
Expand Down

0 comments on commit 88236e0

Please sign in to comment.