feat(cmd/joj3): trigger old conf on new stages empty
This commit is contained in:
parent
40fc67a60d
commit
459d1bf53d
|
@ -160,22 +160,24 @@ func parseConfFile(path string) (conf Conf, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// TODO: remove the following backward compatibility codes
|
// TODO: remove the following backward compatibility codes
|
||||||
conf.Stage.SandboxExecServer = conf.SandboxExecServer
|
if len(conf.Stage.Stages) == 0 {
|
||||||
conf.Stage.SandboxToken = conf.SandboxToken
|
conf.Stage.SandboxExecServer = conf.SandboxExecServer
|
||||||
conf.Stage.OutputPath = conf.OutputPath
|
conf.Stage.SandboxToken = conf.SandboxToken
|
||||||
conf.Stage.Stages = make([]ConfStage, len(conf.Stages))
|
conf.Stage.OutputPath = conf.OutputPath
|
||||||
for i, stage := range conf.Stages {
|
conf.Stage.Stages = make([]ConfStage, len(conf.Stages))
|
||||||
conf.Stage.Stages[i].Name = stage.Name
|
for i, stage := range conf.Stages {
|
||||||
conf.Stage.Stages[i].Group = stage.Group
|
conf.Stage.Stages[i].Name = stage.Name
|
||||||
conf.Stage.Stages[i].Executor = stage.Executor
|
conf.Stage.Stages[i].Group = stage.Group
|
||||||
conf.Stage.Stages[i].Parsers = []struct {
|
conf.Stage.Stages[i].Executor = stage.Executor
|
||||||
Name string
|
conf.Stage.Stages[i].Parsers = []struct {
|
||||||
With interface{}
|
Name string
|
||||||
}{
|
With interface{}
|
||||||
{
|
}{
|
||||||
Name: stage.Parser.Name,
|
{
|
||||||
With: stage.Parser.With,
|
Name: stage.Parser.Name,
|
||||||
},
|
With: stage.Parser.With,
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user