oyafile

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OyaCmdOverride *string

OyaCmdOverride is used in tests, to override the path to the current oya executable. It is used to invoke other tasks from a task body. When tests are run, the current process executable path points to the test runner so it has to be overridden (with 'go run oya.go', roughly speaking).

Functions

This section is empty.

Types

type Oyafile

type Oyafile struct {
	Dir      string
	Path     string
	RootDir  string
	Shell    string
	Imports  map[types.Alias]types.ImportPath
	Tasks    task.Table
	Values   template.Scope
	Project  string   // Project is set for root Oyafile.
	Ignore   []string // Ignore contains directory exclusion rules.
	Requires []PackReference
	// Replacements map packs to local paths relative to project root directory for development based on the Replace: directive.
	Replacements PackReplacements
	IsBuilt      bool

	OyaCmd string // OyaCmd contains the path to the current oya executable.
	// contains filtered or unexported fields
}

func Load

func Load(oyafilePath, rootDir string) (*Oyafile, bool, error)

func LoadFromDir

func LoadFromDir(dirPath, rootDir string) (*Oyafile, bool, error)

func New

func New(oyafilePath string, rootDir string) (*Oyafile, error)

func Parse

func Parse(raw *raw.Oyafile) (*Oyafile, error)

func (*Oyafile) Build

func (oyafile *Oyafile) Build(loader PackLoader) error

func (Oyafile) Equals

func (oyafile Oyafile) Equals(other Oyafile) bool

func (*Oyafile) Ignores

func (o *Oyafile) Ignores() string

func (*Oyafile) RelPath

func (o *Oyafile) RelPath() string

func (Oyafile) RunTask

func (oyafile Oyafile) RunTask(taskName task.Name, scope template.Scope, stdout, stderr io.Writer) (bool, error)

type PackLoader

type PackLoader interface {
	Load(importPath types.ImportPath) (*Oyafile, bool, error)
}

type PackReference

type PackReference struct {
	ImportPath types.ImportPath
	Version    semver.Version
	// ReplacementPath is a path relative to the root directory, when the replacement for the pack can be found, based on the Replace: directive.
	ReplacementPath string
}

type PackReplacements

type PackReplacements map[types.ImportPath]string

Jump to

Keyboard shortcuts

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