Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
add prebuild function
Browse files Browse the repository at this point in the history
  • Loading branch information
imantung committed Oct 16, 2019
1 parent 1972c60 commit acbb9d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 15 additions & 0 deletions EXPERIMENTAL/typicmd/prebuilder/prebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,22 @@ func (p *prebuilder) Initiate(ctx *typictx.Context) (err error) {
Root: ctx.Root,
Packages: packages,
}
return
}

func (p *prebuilder) Prebuild() (err error) {
err = p.TestTarget.Generate()
if err != nil {
return
}
err = p.Annotated.Generate()
if err != nil {
return
}
err = p.Configuration.Generate()
if err != nil {
return
}
return
}

Expand Down
4 changes: 1 addition & 3 deletions EXPERIMENTAL/typicmd/prebuilder/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ func Run(ctx *typictx.Context) {
typienv.PrepareEnvFile(ctx)
prebuilder := prebuilder{}
fatalIfError(prebuilder.Initiate(ctx))
fatalIfError(prebuilder.TestTarget.Generate())
fatalIfError(prebuilder.Annotated.Generate())
fatalIfError(prebuilder.Configuration.Generate())
fatalIfError(prebuilder.Prebuild())
}

func fatalIfError(err error) {
Expand Down

0 comments on commit acbb9d5

Please sign in to comment.