mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-16 08:27:06 +08:00
bump compose-go to v2.4.7
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
10
vendor/github.com/compose-spec/compose-go/v2/loader/extends.go
generated
vendored
10
vendor/github.com/compose-spec/compose-go/v2/loader/extends.go
generated
vendored
@ -29,7 +29,7 @@ import (
|
||||
|
||||
// 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"}
|
||||
var exclusions = []string{"depends_on", "volumes_from"}
|
||||
|
||||
func ApplyExtends(ctx context.Context, dict map[string]any, opts *Options, tracker *cycleTracker, post ...PostProcessor) error {
|
||||
a, ok := dict["services"]
|
||||
@ -123,13 +123,15 @@ func applyServiceExtends(ctx context.Context, name string, services map[string]a
|
||||
},
|
||||
})
|
||||
}
|
||||
for _, exclusion := range exclusions {
|
||||
delete(source, exclusion)
|
||||
}
|
||||
merged, err := override.ExtendService(source, service)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, exclusion := range exclusions {
|
||||
delete(merged, exclusion)
|
||||
}
|
||||
|
||||
delete(merged, "extends")
|
||||
services[name] = merged
|
||||
return merged, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user