taskfile

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 (
	// ErrCantUnmarshalVar is returned for invalid var YAML.
	ErrCantUnmarshalVar = errors.New("task: can't unmarshal var value")
)

Functions

func Merge

func Merge(t1, t2 *Taskfile) error

Merge merges the second Taskfile into the first

Types

type Call

type Call struct {
	Task string
	Vars Vars
}

Call is the parameters to a task call

type Cmd

type Cmd struct {
	Cmd         string
	Silent      bool
	Task        string
	Vars        Vars
	IgnoreError bool
}

Cmd is a task command

func (*Cmd) UnmarshalYAML

func (c *Cmd) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface

type Dep

type Dep struct {
	Task string
	Vars Vars
}

Dep is a task dependency

func (*Dep) UnmarshalYAML

func (d *Dep) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface

type Task

type Task struct {
	Task        string
	Cmds        []*Cmd
	Deps        []*Dep
	Desc        string
	Sources     []string
	Generates   []string
	Status      []string
	Dir         string
	Vars        Vars
	Env         Vars
	Silent      bool
	Method      string
	Prefix      string
	IgnoreError bool `yaml:"ignore_error"`
}

Task represents a task

type Taskfile

type Taskfile struct {
	Version    string
	Expansions int
	Output     string
	Vars       Vars
	Tasks      Tasks
}

Taskfile represents a Taskfile.yml

func (*Taskfile) UnmarshalYAML

func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface

type Tasks

type Tasks map[string]*Task

Tasks representas a group of tasks

type Var

type Var struct {
	Static string
	Sh     string
}

Var represents either a static or dynamic variable.

func (*Var) UnmarshalYAML

func (v *Var) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface.

type Vars

type Vars map[string]Var

Vars is a string[string] variables map.

func (Vars) ToStringMap

func (vs Vars) ToStringMap() (m map[string]string)

ToStringMap converts Vars to a string map containing only the static variables

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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