upgrade libcompose to fbdac0a6a80837c63eb6c8f43514f7bb3f32df6c

This commit is contained in:
Tuna
2016-10-09 02:35:51 +02:00
parent 5a37bf0fb4
commit 592cc95907
567 changed files with 6730 additions and 44603 deletions
+4 -9
View File
@@ -6,16 +6,10 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/utils"
"gopkg.in/yaml.v2"
)
// MergeServicesV1 merges a v1 compose file into an existing set of service configs
func MergeServicesV1(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, bytes []byte, options *ParseOptions) (map[string]*ServiceConfigV1, error) {
datas := make(RawServiceMap)
if err := yaml.Unmarshal(bytes, &datas); err != nil {
return nil, err
}
func MergeServicesV1(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, datas RawServiceMap, options *ParseOptions) (map[string]*ServiceConfigV1, error) {
if options.Interpolate {
if err := Interpolate(environmentLookup, &datas); err != nil {
return nil, err
@@ -116,10 +110,11 @@ func parseV1(resourceLookup ResourceLookup, environmentLookup EnvironmentLookup,
return nil, err
}
var baseRawServices RawServiceMap
if err := yaml.Unmarshal(bytes, &baseRawServices); err != nil {
config, err := CreateConfig(bytes)
if err != nil {
return nil, err
}
baseRawServices := config.Services
if options.Interpolate {
err = Interpolate(environmentLookup, &baseRawServices)