run

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecRunner

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

ExecRunner is the default Runner implementation that invokes the system 'make' command. It constructs the command line to include the '-f' flag for the Makefile path, any additional flags, and the specified targets. Standard output and error are forwarded.

func (*ExecRunner) Run

func (r *ExecRunner) Run(ctx context.Context, path string, makeFlags, targets []string) error

Run executes the make command with the specified Makefile path, flags, and targets. It builds arguments as: make -f <path> <makeFlags...> <targets...>. The command's stdout and stderr are connected to the current process.

type Runner

type Runner interface {
	// Run executes the provided make targets using the Makefile at path.
	// makeFlags are passed to the make command, and targets specify which targets to run.
	Run(ctx context.Context, path string, makeFlags, targets []string) error
}

Runner defines the interface for executing Makefile targets. Implementations of Runner take a path to a Makefile, flags for make, and target names to execute.

func New

func New(cfg *config.Config) Runner

New returns a Runner implementation based on the given configuration. Currently, it returns an ExecRunner that runs the 'make' binary.

Jump to

Keyboard shortcuts

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