run

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelFunc

type CancelFunc func()

type ParallelStep

type ParallelStep struct {
	Parallel Task `yaml:"parallel"`
}

func (ParallelStep) Run

func (c ParallelStep) Run(tasks Tasks) (chan struct{}, CancelFunc)

func (*ParallelStep) SetDir

func (c *ParallelStep) SetDir(dir string)

type RunStep

type RunStep struct {
	// - shell: bash
	//   script: |
	//     echo "Hello World!"
	Script string `yaml:"run"`
	Shell  string `yaml:"shell"`
	RunIn  string `yaml:"run-in"`
	// contains filtered or unexported fields
}

func (RunStep) Run

func (c RunStep) Run(tasks Tasks) (chan struct{}, CancelFunc)

func (*RunStep) SetDir

func (c *RunStep) SetDir(dir string)

type Step

type Step interface {
	Run(tasks Tasks) (chan struct{}, CancelFunc)
	SetDir(dir string)
}

type Task

type Task struct {
	Steps []Step
}

func (Task) Run

func (t Task) Run(tasks Tasks) (chan struct{}, CancelFunc)

func (Task) RunParallel

func (t Task) RunParallel(tasks Tasks) (chan struct{}, CancelFunc)

func (*Task) UnmarshalYAML

func (t *Task) UnmarshalYAML(unmarshal func(interface{}) error) error

type TaskStep

type TaskStep struct {
	// Task:
	// - task: <task-name>
	Task string
}

func (TaskStep) Run

func (c TaskStep) Run(tasks Tasks) (chan struct{}, CancelFunc)

func (*TaskStep) SetDir

func (c *TaskStep) SetDir(dir string)

type Tasks

type Tasks map[string]Task

func GetTasks

func GetTasks() Tasks

func (Tasks) Append

func (t Tasks) Append(tasks Tasks, dir string)

func (Tasks) Run

func (t Tasks) Run(name string)

type WatchStep

type WatchStep struct {
	Watch   []string `yaml:"watch"`
	Exclude []string `yaml:"exclude"`
	Do      Task     `yaml:"do"`
}

func (WatchStep) Run

func (c WatchStep) Run(tasks Tasks) (chan struct{}, CancelFunc)

func (*WatchStep) SetDir

func (c *WatchStep) SetDir(dir string)

Jump to

Keyboard shortcuts

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