Documentation ¶
Index ¶
- Constants
- Variables
- func InitTaskfile(w io.Writer, dir string) error
- type Executor
- func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error)
- func (e *Executor) FastCompiledTask(call taskfile.Call) (*taskfile.Task, error)
- func (e *Executor) GetHash(t *taskfile.Task) (string, error)
- func (e *Executor) InterceptInterruptSignals()
- func (e *Executor) ListAllTasks()
- func (e *Executor) ListTaskNames(allTasks bool)
- func (e *Executor) ListTasksWithDesc()
- func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error
- func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error
- func (e *Executor) Setup() error
- func (e *Executor) Status(ctx context.Context, calls ...taskfile.Call) error
- type MaximumTaskCallExceededError
- type TaskRunError
Constants ¶
const ( // MaximumTaskCall is the max number of times a task can be called. // This exists to prevent infinite loops on cyclic dependencies MaximumTaskCall = 100 )
Variables ¶
var ( // ErrPreconditionFailed is returned when a precondition fails ErrPreconditionFailed = errors.New("task: precondition not met") )
var ( // ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists") )
Functions ¶
Types ¶
type Executor ¶
type Executor struct { Taskfile *taskfile.Taskfile Dir string TempDir string Entrypoint string Force bool Watch bool Verbose bool Silent bool Dry bool Summary bool Parallel bool Color bool Concurrency int Stdin io.Reader Stdout io.Writer Stderr io.Writer Logger *logger.Logger Compiler compiler.Compiler Output output.Output OutputStyle taskfile.Output // contains filtered or unexported fields }
Executor executes a Taskfile
func (*Executor) CompiledTask ¶
CompiledTask returns a copy of a task, but replacing variables in almost all properties using the Go template package.
func (*Executor) FastCompiledTask ¶ added in v3.2.2
FastCompiledTask is like CompiledTask, but it skippes dynamic variables.
func (*Executor) InterceptInterruptSignals ¶ added in v3.13.0
func (e *Executor) InterceptInterruptSignals()
NOTE(@andreynering): This function intercepts SIGINT and SIGTERM signals so the Task process is not killed immediatelly and processes running have time to do cleanup work.
func (*Executor) ListAllTasks ¶ added in v3.10.0
func (e *Executor) ListAllTasks()
ListAllTasks reports all tasks, with or without a description spec.
func (*Executor) ListTaskNames ¶ added in v3.12.0
PrintTaskNames prints only the task names in a Taskfile. Only tasks with a non-empty description are printed if allTasks is false. Otherwise, all task names are printed.
func (*Executor) ListTasksWithDesc ¶ added in v3.10.0
func (e *Executor) ListTasksWithDesc()
ListTasksWithDesc reports tasks that have a description spec.
type MaximumTaskCallExceededError ¶
type MaximumTaskCallExceededError struct {
// contains filtered or unexported fields
}
MaximumTaskCallExceededError is returned when a task is called too many times. In this case you probably have a cyclic dependendy or infinite loop
func (*MaximumTaskCallExceededError) Error ¶
func (e *MaximumTaskCallExceededError) Error() string
type TaskRunError ¶ added in v3.13.0
type TaskRunError struct {
// contains filtered or unexported fields
}
func (*TaskRunError) Error ¶ added in v3.13.0
func (err *TaskRunError) Error() string
func (*TaskRunError) ExitCode ¶ added in v3.13.0
func (err *TaskRunError) ExitCode() int