Skip to content

Commit

Permalink
add starterproject validation back
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Feb 11, 2021
1 parent 2b50898 commit da67742
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/devfile/library
go 1.13

require (
github.com/devfile/api/v2 v2.0.0-20210202172954-6424f4139ac7
github.com/devfile/api/v2 v2.0.0-20210211160219-33a78aec06af
github.com/fatih/color v1.7.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/gobwas/glob v0.2.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/devfile/api/v2 v2.0.0-20210202172954-6424f4139ac7 h1:bQGUVLEGQtVkvS94K4gQbu57Rk/npcZQmgORmCWYNy8=
github.com/devfile/api/v2 v2.0.0-20210202172954-6424f4139ac7/go.mod h1:Cot4snybn3qhIh48oIFi9McocnIx7zY5fFbjfrIpPvg=
github.com/devfile/api/v2 v2.0.0-20210211160219-33a78aec06af h1:egbFAAS/CWJMAqa4zIm8Cik3+iCqTAfLPfCj6PLEG5Y=
github.com/devfile/api/v2 v2.0.0-20210211160219-33a78aec06af/go.mod h1:Cot4snybn3qhIh48oIFi9McocnIx7zY5fFbjfrIpPvg=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
Expand Down
16 changes: 8 additions & 8 deletions pkg/devfile/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func ValidateDevfileData(data devfileData.DevfileData) error {
if err != nil {
return err
}
//starterProjects, err := data.GetStarterProjects(common.DevfileOptions{})
//if err != nil {
// return err
//}
starterProjects, err := data.GetStarterProjects(common.DevfileOptions{})
if err != nil {
return err
}

var errstrings []string
// validate components
Expand All @@ -51,10 +51,10 @@ func ValidateDevfileData(data devfileData.DevfileData) error {
errstrings = append(errstrings, err.Error())
}

//err = validation.ValidateStarterProjects(starterProjects)
//if err != nil {
// errstrings = append(errstrings, err.Error())
//}
err = validation.ValidateStarterProjects(starterProjects)
if err != nil {
errstrings = append(errstrings, err.Error())
}

if len(errstrings) > 0 {
return fmt.Errorf(strings.Join(errstrings, "\n"))
Expand Down

0 comments on commit da67742

Please sign in to comment.