package module
Version: v2.2.0+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 30 Imported by: 13


Build Status


Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make.

See taskfile.org for documentation.




View Source
const (
	// MaximumTaskCall is the max number of times a task can be called.
	// This exists to prevent infinite loops on cyclic dependencies
	MaximumTaskCall = 100


View Source
var (
	// ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists
	ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists")


func InitTaskfile added in v1.3.1

func InitTaskfile(w io.Writer, dir string) error

InitTaskfile Taskfile creates a new Taskfile


type Executor added in v1.3.1

type Executor struct {
	Taskfile *taskfile.Taskfile
	Dir      string
	Force    bool
	Watch    bool
	Verbose  bool
	Silent   bool
	Dry      bool

	Context context.Context

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Logger   *logger.Logger
	Compiler compiler.Compiler
	Output   output.Output
	// contains filtered or unexported fields

Executor executes a Taskfile

func (*Executor) CompiledTask added in v1.4.3

func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error)

CompiledTask returns a copy of a task, but replacing variables in almost all properties using the Go template package.

func (*Executor) PrintTasksHelp added in v1.4.1

func (e *Executor) PrintTasksHelp()

PrintTasksHelp prints help os tasks that have a description

func (*Executor) Run added in v1.3.1

func (e *Executor) Run(calls ...taskfile.Call) error

Run runs Task

func (*Executor) RunTask added in v1.3.1

func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error

RunTask runs a task by its name

func (*Executor) Setup

func (e *Executor) Setup() error

Setup setups Executor's internal state

func (*Executor) Status

func (e *Executor) Status(calls ...taskfile.Call) error

Status returns an error if any the of given tasks is not up-to-date

type MaximumTaskCallExceededError added in v1.4.1

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 added in v1.4.1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL