blueprint: fix groups definition

Group has no version field, remove it.
This commit is contained in:
Ondřej Budai 2019-10-31 06:54:45 +01:00 committed by Tom Gundersen
parent 705338c5b3
commit 93e7a26785
2 changed files with 8 additions and 3 deletions

View file

@ -25,7 +25,7 @@ type Blueprint struct {
Version string `json:"version,omitempty"`
Packages []Package `json:"packages"`
Modules []Package `json:"modules"`
Groups []Package `json:"groups"`
Groups []Group `json:"groups"`
Customizations *Customizations `json:"customizations,omitempty"`
}
@ -35,6 +35,11 @@ type Package struct {
Version string `json:"version,omitempty"`
}
// A group specifies an package group.
type Group struct {
Name string `json:"name"`
}
type output interface {
translate(b *Blueprint) *pipeline.Pipeline
getName() string

View file

@ -306,7 +306,7 @@ func (s *Store) GetBlueprint(name string, bp *blueprint.Blueprint, changed *bool
bp.Modules = []blueprint.Package{}
}
if bp.Groups == nil {
bp.Groups = []blueprint.Package{}
bp.Groups = []blueprint.Group{}
}
if bp.Version == "" {
bp.Version = "0.0.0"
@ -337,7 +337,7 @@ func (s *Store) GetBlueprintCommitted(name string, bp *blueprint.Blueprint) bool
bp.Modules = []blueprint.Package{}
}
if bp.Groups == nil {
bp.Groups = []blueprint.Package{}
bp.Groups = []blueprint.Group{}
}
if bp.Version == "" {
bp.Version = "0.0.0"