taskfile

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const NamespaceSeparator = ":"

NamespaceSeparator contains the character that separates namescapes

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, namespaces ...string) 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
	Summary     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
	Includes   map[string]string
	Vars       Vars
	Env        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 represents 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