zuild

package
v0.0.0-...-bcaeecf Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTaskName = "default"
)
View Source
const (
	DefaultZfPath = "Zuildfile"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name  string `hcl:"name,label"`
	Short string `hcl:"short"`
	Usage string `hcl:"usage"`
}

type Help

type Help struct {
	Title   string `hcl:"title"`
	Content string `hcl:"content"`
}

type Task

type Task struct {
	Name    string       `hcl:"name,label"`
	Require []string     `hcl:"require,optional"`
	Sh      []*action.Sh `hcl:"Sh,block"`

	Config hcl.Body `hcl:",remain"`

	Node graph.Node
}

func (*Task) Actions

func (t *Task) Actions(index map[string]int) action.Actions

type TaskGraph

type TaskGraph struct {
	// contains filtered or unexported fields
}

func NewTaskGraph

func NewTaskGraph() *TaskGraph

func (*TaskGraph) Get

func (t *TaskGraph) Get(root string) ([]*Task, error)

func (*TaskGraph) Populate

func (t *TaskGraph) Populate(tasks []*Task)

type Zuild

type Zuild struct {
	*emission.Emitter
	// contains filtered or unexported fields
}

func New

func New(cmd *cobra.Command, zi *ZuildFileInit) (*Zuild, error)

func (*Zuild) Graph

func (z *Zuild) Graph(task string) error

func (*Zuild) List

func (z *Zuild) List() error

func (*Zuild) Run

func (z *Zuild) Run(task string) error

type ZuildFile

type ZuildFile struct {
	Help   *Help    `hcl:"Help,block"`
	Args   []*Arg   `hcl:"Arg,block"`
	Tasks  []*Task  `hcl:"Task,block"`
	Remain hcl.Body `hcl:",remain"`
	// contains filtered or unexported fields
}

func EvalZuildFile

func EvalZuildFile(zi *ZuildFileInit, ctx *hcl.EvalContext) (*ZuildFile, error)

type ZuildFileInit

type ZuildFileInit struct {
	Help *Help  `hcl:"Help,block"`
	Args []*Arg `hcl:"Arg,block"`

	Remain hcl.Body `hcl:",remain"`
	// contains filtered or unexported fields
}

func ParseZuildFile

func ParseZuildFile(path string) (*ZuildFileInit, error)

Jump to

Keyboard shortcuts

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