Documentation ¶
Index ¶
- Constants
- Variables
- type Call
- type Cmd
- type Dep
- type ErrInvalidPlatform
- type For
- type Glob
- type Include
- type Includes
- type Location
- type MatchingTask
- type Output
- type OutputGroup
- type Platform
- type Precondition
- type Requires
- type Task
- type Taskfile
- type TaskfileGraph
- type TaskfileVertex
- type Tasks
- type Var
- type Vars
Constants ¶
const NamespaceSeparator = ":"
NamespaceSeparator contains the character that separates namespaces
Variables ¶
var ErrCantUnmarshalPrecondition = errors.New("task: Can't unmarshal precondition value")
ErrCantUnmarshalPrecondition is returned for invalid precond YAML.
var ErrIncludedTaskfilesCantHaveDotenvs = errors.New("task: Included Taskfiles can't have dotenv declarations. Please, move the dotenv declaration to the main Taskfile")
ErrIncludedTaskfilesCantHaveDotenvs is returned when a included Taskfile contains dotenvs
var V3 = semver.MustParse("3")
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct { Task string Vars *Vars Silent bool Indirect bool // True if the task was called by another task }
Call is the parameters to a task call
type Cmd ¶
type Cmd struct { Cmd string Task string For *For Silent bool Set []string Shopt []string Vars *Vars IgnoreError bool Defer bool Platforms []*Platform }
Cmd is a task command
func (*Cmd) UnmarshalYAML ¶
type ErrInvalidPlatform ¶
type ErrInvalidPlatform struct {
Platform string
}
func (*ErrInvalidPlatform) Error ¶
func (err *ErrInvalidPlatform) Error() string
type For ¶
func (*For) UnmarshalYAML ¶
type Glob ¶
func (*Glob) UnmarshalYAML ¶
type Include ¶
type Include struct { Namespace string Taskfile string Dir string Optional bool Internal bool Aliases []string AdvancedImport bool Vars *Vars }
Include represents information about included taskfiles
func (*Include) DeepCopy ¶
DeepCopy creates a new instance of IncludedTaskfile and copies data by value from the source struct.
func (*Include) UnmarshalYAML ¶
type Includes ¶
type Includes struct { omap.OrderedMap[string, *Include] }
Includes represents information about included tasksfiles
func (*Includes) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type MatchingTask ¶ added in v3.35.0
type Output ¶
type Output struct { // Name of the Output. Name string `yaml:"-"` // Group specific style Group OutputGroup }
Output of the Task output
func (*Output) UnmarshalYAML ¶
type OutputGroup ¶
OutputGroup is the style options specific to the Group style.
func (*OutputGroup) IsSet ¶
func (g *OutputGroup) IsSet() bool
IsSet returns true if and only if a custom output style is set.
type Platform ¶
Platform represents GOOS and GOARCH values
func (*Platform) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler interface.
type Precondition ¶
Precondition represents a precondition necessary for a task to run
func (*Precondition) DeepCopy ¶
func (p *Precondition) DeepCopy() *Precondition
func (*Precondition) UnmarshalYAML ¶
func (p *Precondition) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler interface.
type Requires ¶
type Requires struct {
Vars []string
}
Requires represents a set of required variables necessary for a task to run
type Task ¶
type Task struct { Task string Cmds []*Cmd Deps []*Dep Label string Desc string Prompt string Summary string Requires *Requires Aliases []string Sources []*Glob Generates []*Glob Status []string Preconditions []*Precondition Dir string Set []string Shopt []string Vars *Vars Env *Vars Dotenv []string Silent bool Interactive bool Internal bool Method string Prefix string IgnoreError bool Run string IncludeVars *Vars IncludedTaskfileVars *Vars Platforms []*Platform Location *Location Watch bool }
Task represents a task
func (*Task) DeepCopy ¶
DeepCopy creates a new instance of Task and copies data by value from the source struct.
func (*Task) UnmarshalYAML ¶
type Taskfile ¶
type Taskfile struct { Location string Version *semver.Version Output Output Method string Includes *Includes Set []string Shopt []string Vars *Vars Env *Vars Tasks Tasks Silent bool Dotenv []string Run string Interval time.Duration }
Taskfile is the abstract syntax tree for a Taskfile
func (*Taskfile) UnmarshalYAML ¶
type TaskfileGraph ¶ added in v3.37.0
func NewTaskfileGraph ¶ added in v3.37.0
func NewTaskfileGraph() *TaskfileGraph
func (*TaskfileGraph) Merge ¶ added in v3.37.0
func (tfg *TaskfileGraph) Merge() (*Taskfile, error)
func (*TaskfileGraph) Visualize ¶ added in v3.37.0
func (tfg *TaskfileGraph) Visualize(filename string) error
type TaskfileVertex ¶ added in v3.37.0
A TaskfileVertex is a vertex on the Taskfile DAG.
type Tasks ¶
type Tasks struct { omap.OrderedMap[string, *Task] }
Tasks represents a group of tasks
func (*Tasks) FindMatchingTasks ¶ added in v3.35.0
func (t *Tasks) FindMatchingTasks(call *Call) []*MatchingTask
func (*Tasks) UnmarshalYAML ¶
type Vars ¶
type Vars struct { omap.OrderedMap[string, Var] }
Vars is a string[string] variables map.
func (*Vars) DeepCopy ¶
DeepCopy creates a new instance of Vars and copies data by value from the source struct.
func (*Vars) ToCacheMap ¶
ToCacheMap converts Vars to a map containing only the static variables