build

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, jobs []BuildJob, numWorkers int, continueOnError bool) <-chan BuildResult

Run executes a list of build jobs concurrently and returns a channel of results.

func RunWithEvents

func RunWithEvents(ctx context.Context, jobs []BuildJob, numWorkers int, continueOnError bool) <-chan BuildEvent

RunWithEvents executes build jobs and returns a channel of events (start and finish)

func RunWithEventsAndOptions

func RunWithEventsAndOptions(ctx context.Context, jobs []BuildJob, numWorkers int, continueOnError bool, opts *RunOptions) <-chan BuildEvent

RunWithEventsAndOptions executes build jobs with options and returns a channel of events

func RunWithOptions

func RunWithOptions(ctx context.Context, jobs []BuildJob, numWorkers int, continueOnError bool, opts *RunOptions) <-chan BuildResult

RunWithOptions executes build jobs with additional options like extra PATH directories.

Types

type BuildEvent

type BuildEvent struct {
	Job        BuildJob
	Type       string       // "start", "finish", or "output"
	Result     *BuildResult // nil for start and output events
	OutputLine string       // For "output" events
}

BuildEvent represents an event during the build process

type BuildJob

type BuildJob struct {
	Name    string   // e.g., "grove-core"
	Path    string   // Absolute path to the project directory
	Command []string // The build command to execute, e.g., ["make", "build"]
}

BuildJob represents a single project to be built.

type BuildResult

type BuildResult struct {
	Job      BuildJob
	Output   []byte // Combined stdout and stderr
	Err      error
	Duration time.Duration
}

BuildResult contains the outcome of a single build job.

type RunOptions

type RunOptions struct {
	// ExtraPathDirs are prepended to PATH for all build commands
	// This allows built tools to be available for subsequent builds
	ExtraPathDirs []string
}

RunOptions contains optional configuration for build runs

Jump to

Keyboard shortcuts

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