manifest

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = 3
)

Variables

This section is empty.

Functions

func EvalEnvSlice added in v1.2.0

func EvalEnvSlice(scope yaml.MapSlice, parentEnv map[string]string) map[string]string

EvalEnvSlice evaluates a single env scope on top of parentEnv. Each entry's ${VAR} references are expanded against earlier entries in the same scope first, then against parentEnv. The returned map contains all parentEnv keys plus the scope's overrides/additions.

Types

type Command

type Command struct {
	Alias    []string      `yaml:"alias"`
	Help     string        `yaml:"help"`
	Args     []string      `yaml:"args"`
	Env      yaml.MapSlice `yaml:"env"` // Scoped to this command and its descendants.
	Deps     []string      `yaml:"deps"`
	Exec     string        `yaml:"exec"`
	Include  string        `yaml:"include"`
	Commands Commands      `yaml:"commands"`
}

type Commands

type Commands map[string]*Command

func (Commands) Count

func (cs Commands) Count() (n int)

type Manifest

type Manifest struct {
	Version int    `yaml:"version"`
	Project string `yaml:"project"`

	Env         yaml.MapSlice          `yaml:"env"` // Use MapSlice to preserve order.
	Options     map[string]interface{} `yaml:"options"`
	Interpreter string                 `yaml:"interpreter"`
	Import      []string               `yaml:"import"`
	Commands    Commands               `yaml:"commands"`
}

func Parse

func Parse(path string) (m *Manifest, err error)

Parse a grml build file.

func (*Manifest) EvalEnv

func (m *Manifest) EvalEnv(parentEnv map[string]string) map[string]string

func (*Manifest) ParseOptions

func (m *Manifest) ParseOptions() (o *options.Options, err error)

Jump to

Keyboard shortcuts

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