mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-16 16:37:10 +08:00
bump compose-go v2.4.6
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
8
vendor/github.com/compose-spec/compose-go/v2/loader/extends.go
generated
vendored
8
vendor/github.com/compose-spec/compose-go/v2/loader/extends.go
generated
vendored
@ -27,6 +27,10 @@ import (
|
||||
"github.com/compose-spec/compose-go/v2/types"
|
||||
)
|
||||
|
||||
// as we use another service definition by `extends`, we must exclude attributes which creates dependency to another service
|
||||
// see https://github.com/compose-spec/compose-spec/blob/main/05-services.md#restrictions
|
||||
var exclusions = []string{"extends", "depends_on", "volumes_from"}
|
||||
|
||||
func ApplyExtends(ctx context.Context, dict map[string]any, opts *Options, tracker *cycleTracker, post ...PostProcessor) error {
|
||||
a, ok := dict["services"]
|
||||
if !ok {
|
||||
@ -123,7 +127,9 @@ func applyServiceExtends(ctx context.Context, name string, services map[string]a
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
delete(merged, "extends")
|
||||
for _, exclusion := range exclusions {
|
||||
delete(merged, exclusion)
|
||||
}
|
||||
services[name] = merged
|
||||
return merged, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user