You've already forked dcmerge
feat: support depends_on
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This PR supports the extended pattern of `depends_on`. If the short version of `depends_on` is defined, it will be migrated to the extended version like the example below: ```yaml services: web: depends_on - database services: web: depends_on: database: condition: service_started ``` All three types of merging strategies are supported.
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
"git.cryptic.systems/volker.raschek/dcmerge/pkg/domain/dockerCompose"
|
||||
"git.cryptic.systems/volker.raschek/dcmerge/pkg/fetcher"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func Execute(version string) error {
|
||||
@ -100,10 +100,12 @@ func run(cmd *cobra.Command, args []string) error {
|
||||
defer f.Close()
|
||||
|
||||
yamlEncoder := yaml.NewEncoder(f)
|
||||
yamlEncoder.SetIndent(0)
|
||||
return yamlEncoder.Encode(dockerComposeConfig)
|
||||
|
||||
default:
|
||||
yamlEncoder := yaml.NewEncoder(os.Stdout)
|
||||
yamlEncoder.SetIndent(0)
|
||||
return yamlEncoder.Encode(dockerComposeConfig)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user