27 lines
485 B
Go
27 lines
485 B
Go
package execution
|
|
|
|
import (
|
|
"context"
|
|
|
|
"code.icb4dc0.de/buildr/buildr/modules"
|
|
)
|
|
|
|
type Spec struct {
|
|
RepoRoot string
|
|
BinariesDirectory string
|
|
CacheDirectory string
|
|
OutDirectory string
|
|
LogsDirectory string
|
|
LogToStdErr bool
|
|
}
|
|
|
|
type TaskProvider interface {
|
|
CanProvide(m modules.ModuleWithMeta) bool
|
|
Create(m modules.ModuleWithMeta) (Task, error)
|
|
}
|
|
|
|
type Task interface {
|
|
Execute(ctx context.Context, spec Spec) error
|
|
AddDependentTask(other Task)
|
|
}
|