You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
381 B
Go
23 lines
381 B
Go
package exec
|
|
|
|
import (
|
|
"github.com/aziis98/cabret"
|
|
"github.com/aziis98/cabret/config"
|
|
"github.com/aziis98/cabret/pipeline"
|
|
)
|
|
|
|
func Execute(cfg *config.Cabretfile) error {
|
|
for _, p := range cfg.Build {
|
|
ops, err := pipeline.Parse(p)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
if _, err := pipeline.Process([]cabret.Content{}, ops); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|