Add prepare() function

This commit is contained in:
Elara 2022-09-30 13:22:10 -07:00
parent 3cf1e7f513
commit 3ac715d447
1 changed files with 11 additions and 1 deletions

View File

@ -199,7 +199,17 @@ func buildPackage(ctx context.Context, script string, mgr manager.Manager) ([]st
return nil, nil, err
}
fn, ok := dec.GetFunc("build")
fn, ok := dec.GetFunc("prepare")
if ok {
log.Info("Executing prepare()").Send()
err = fn(ctx, srcdir)
if err != nil {
return nil, nil, err
}
}
fn, ok = dec.GetFunc("build")
if ok {
log.Info("Executing build()").Send()