feat(config): add Scaffolding.Boards typed input with 6 defaults
This commit is contained in:
@@ -61,6 +61,16 @@ type RenodeConfig struct {
|
||||
Platforms []RenodePlatform `yaml:"platforms"`
|
||||
}
|
||||
|
||||
type Board struct {
|
||||
Name string `yaml:"name"`
|
||||
FQBN string `yaml:"fqbn"`
|
||||
Template string `yaml:"template"`
|
||||
}
|
||||
|
||||
type Scaffolding struct {
|
||||
Boards []Board `yaml:"boards"`
|
||||
}
|
||||
|
||||
// Config is the fully-resolved runtime configuration.
|
||||
type Config struct {
|
||||
Version int `yaml:"version"`
|
||||
@@ -76,6 +86,7 @@ type Config struct {
|
||||
ShellConfig ShellConfigSection `yaml:"shell_config"`
|
||||
Neovim NeovimConfig `yaml:"neovim"`
|
||||
Renode RenodeConfig `yaml:"renode"`
|
||||
Scaffolding Scaffolding `yaml:"scaffolding"`
|
||||
}
|
||||
|
||||
const currentVersion = 1
|
||||
@@ -161,5 +172,8 @@ func merge(base, over Config) Config {
|
||||
if over.Renode.WokwiVersion != "" || len(over.Renode.Platforms) > 0 {
|
||||
out.Renode = over.Renode
|
||||
}
|
||||
if len(over.Scaffolding.Boards) > 0 {
|
||||
out.Scaffolding = over.Scaffolding
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user