mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
let build config and legacy imports co-exists
This commit is contained in:
parent
5329ef8f25
commit
45876968d9
|
@ -194,18 +194,16 @@ func LoadBuildConfig(configFile string) (*Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// for backward compatible
|
// for backward compatible
|
||||||
if len(config.Imports) > 0 {
|
if config.Build == nil {
|
||||||
if config.Build != nil {
|
if len(config.Imports) > 0 {
|
||||||
return nil, fmt.Errorf("the legacy imports is defined, which conflics with the build configuration")
|
config.Build = &BuildConfig{
|
||||||
}
|
BuildDir: "build",
|
||||||
|
Imports: config.Imports,
|
||||||
config.Build = &BuildConfig{
|
Targets: []BuildTargetConfig{
|
||||||
BuildDir: "build",
|
{Name: "bbgow-amd64-darwin", Arch: "amd64", OS: "darwin"},
|
||||||
Imports: config.Imports,
|
{Name: "bbgow-amd64-linux", Arch: "amd64", OS: "linux"},
|
||||||
Targets: []BuildTargetConfig{
|
},
|
||||||
{Name: "bbgow-amd64-darwin", Arch: "amd64", OS: "darwin"},
|
}
|
||||||
{Name: "bbgow-amd64-linux", Arch: "amd64", OS: "linux"},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user