build

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalCache added in v0.2.1

func NewLocalCache(workspaceDir string) cache.Cache

NewLocalCache creates a cache backed by the given workspace.

Types

type Builder

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

func NewBuilder

func NewBuilder(opts Options) (*Builder, error)

NewBuilder creates a new Builder.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, targets []*modules.Module) ([]Result, error)

type Command added in v0.3.4

type Command struct {
	Name string
	Args []string
	Env  []string
	Dir  string
}

Command describes a command before target defaults are applied.

type Options

type Options struct {
	Store     repo.Store
	MatrixStr string
	// RunTest, when true, causes Build to invoke OnTest on the root target
	// after OnBuild (or after reusing cached build metadata). The build
	// cache is consulted as usual: on a cache hit the root's OnBuild is
	// skipped and OnTest runs against the cached artifacts; on a cache
	// miss OnBuild runs and the fresh metadata is cached before OnTest.
	// Transitive dependencies honor the cache normally and do not have
	// their OnTest hooks triggered.
	RunTest      bool
	Stdout       io.Writer
	Stderr       io.Writer
	WorkspaceDir string
	Cache        cache.Cache
	Target       Target
}

type Patch added in v0.3.4

type Patch struct {
	Name       string
	PrependArg []string
	AppendArg  []string
	Env        []string
}

Patch contains target-specific changes for one command.

type Result

type Result struct {
	Module    module.Version
	Metadata  string
	OutputDir string
}

type Target added in v0.3.4

type Target interface {
	Use(Command) Patch
}

Target applies language-specific target defaults to build commands.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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