spec

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckOptions

type CheckOptions map[string]bool

type ChoiceOption

type ChoiceOption struct {
	Set     string
	Options []string
}

type ChoiceOptions

type ChoiceOptions map[string]*ChoiceOption

type Command

type Command struct {
	AsRoot      bool       `yaml:"as-root"`
	Aliases     []string   `yaml:"aliases"`
	Help        string     `yaml:"help"`
	Deps        []*Command `yaml:"-"`
	DepsStrings []string   `yaml:"deps"`
	Exec        string     `yaml:"exec"`
	Commands    Commands   `yaml:"commands"`
	// contains filtered or unexported fields
}

Command defines a build command.

func (*Command) FullName

func (c *Command) FullName() string

FullName returns the command's full name including parents.

func (*Command) Name

func (c *Command) Name() string

Name returns the command's name.

func (*Command) Spec

func (c *Command) Spec() *Spec

Spec returns the command's spec.

type Commands

type Commands map[string]*Command

type Spec

type Spec struct {
	Env           map[string]string      `yaml:"-"`
	EnvMap        yaml.MapSlice          `yaml:"env"`
	Options       map[string]interface{} `yaml:"options"`
	ChoiceOptions ChoiceOptions          `yaml:"-"`
	CheckOptions  CheckOptions           `yaml:"-"`
	Commands      Commands               `yaml:"commands"`
}

Spec defines a grml build file.

func ParseSpec

func ParseSpec(path string, env map[string]string) (s *Spec, err error)

ParseSpec parses a grml build file. Pass a preset environment map, which will be added to the final spec's environment.

func (Spec) ExecEnv

func (s Spec) ExecEnv() (env []string)

ExecEnv returns the execute process environment variables.

Jump to

Keyboard shortcuts

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