Documentation ¶
Index ¶
- Constants
- Variables
- func InitTaskfile(path string) error
- type Cmd
- type Dep
- type Executor
- func (e *Executor) HasCyclicDep() bool
- func (e *Executor) ReadTaskfile() error
- func (e *Executor) ReplaceSliceVariables(initials []string, task string, vars Vars) ([]string, error)
- func (e *Executor) ReplaceVariables(initial, task string, vars Vars) (string, error)
- func (e *Executor) Run(args ...string) error
- func (e *Executor) RunTask(ctx context.Context, name string, vars Vars) error
- type Task
- type Tasks
- type Vars
Constants ¶
View Source
const (
// TaskFilePath is the default Taskfile
TaskFilePath = "Taskfile"
)
Variables ¶
View Source
var ( // ErrCantUnmarshalCmd is returned for invalid command YAML ErrCantUnmarshalCmd = errors.New("task: can't unmarshal cmd value") // ErrCantUnmarshalDep is returned for invalid dependency YAML ErrCantUnmarshalDep = errors.New("task: can't unmarshal dep value") )
View Source
var ( // ErrCyclicDependencyDetected is returned when a cyclic dependency was found in the Taskfile ErrCyclicDependencyDetected = errors.New("task: cyclic dependency detected") // ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists") )
View Source
var ( // TaskvarsFilePath file containing additional variables TaskvarsFilePath = "Taskvars" // ErrMultilineResultCmd is returned when a command returns multiline result ErrMultilineResultCmd = errors.New("Got multiline result from command") )
Functions ¶
func InitTaskfile ¶ added in v1.3.1
InitTaskfile Taskfile creates a new Taskfile
Types ¶
type Cmd ¶ added in v1.4.0
Cmd is a task command
func (*Cmd) UnmarshalYAML ¶ added in v1.4.0
UnmarshalYAML implements yaml.Unmarshaler interface
type Dep ¶ added in v1.4.0
Dep is a task dependency
func (*Dep) UnmarshalYAML ¶ added in v1.4.0
UnmarshalYAML implements yaml.Unmarshaler interface
type Executor ¶ added in v1.3.1
type Executor struct { Tasks Tasks Dir string Force bool Watch bool Verbose bool Stdin io.Reader Stdout io.Writer Stderr io.Writer // contains filtered or unexported fields }
Executor executes a Taskfile
func (*Executor) HasCyclicDep ¶ added in v1.3.1
HasCyclicDep checks if a task tree has any cyclic dependency
func (*Executor) ReadTaskfile ¶ added in v1.3.1
ReadTaskfile parses Taskfile from the disk
func (*Executor) ReplaceSliceVariables ¶ added in v1.4.0
func (e *Executor) ReplaceSliceVariables(initials []string, task string, vars Vars) ([]string, error)
ReplaceSliceVariables writes vars into initial string slice
func (*Executor) ReplaceVariables ¶ added in v1.4.0
ReplaceVariables writes vars into initial string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.