task

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEnvToStringSlice

func ConvertEnvToStringSlice(env map[string]string) []string

func InitTaskfile added in v0.6.2

func InitTaskfile() error

Types

type Config

type Config struct {
	DotEnv      string            `toml:"dotenv"`
	Env         map[string]string `toml:"env"`
	Tasks       map[string]Task   `toml:"tasks"`
	ScriptDir   string            `toml:"script_dir"`
	TaskFileDir string
}

represents parsed task file

func NewTaskConfig

func NewTaskConfig(taskFile, cliArgs string) (*Config, error)

func (*Config) CompileEnv added in v0.4.0

func (c *Config) CompileEnv() ([]string, error)

sets the top-level env

type Executor

type Executor struct {
	Stdout io.Writer
	Stdin  io.Reader
	Stderr io.Writer
	Config *Config
}

func (*Executor) ListTasksFromTaskFile

func (exec *Executor) ListTasksFromTaskFile(regex *regexp.Regexp)

func (*Executor) RunTasks

func (exec *Executor) RunTasks(config *Config, tasks *[]string) error

type Task

type Task struct {
	Cmds   []string          `toml:"cmds"`
	Deps   [][]string        `toml:"deps"`
	Dir    string            `toml:"dir"`
	Env    map[string]string `toml:"env"`
	DotEnv string            `toml:"dotenv"`
	Pure   bool              `toml:"pure"`
}

represents an individual task

func (*Task) CompileEnv added in v0.4.0

func (t *Task) CompileEnv(env []string) ([]string, error)

type Vals added in v0.6.0

type Vals struct {
	CLI_ARGS string
}

Jump to

Keyboard shortcuts

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