build

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Products

func Products(projectInfo distgo.ProjectInfo, projectParam distgo.ProjectParam, productBuildIDs []distgo.ProductBuildID, buildOpts Options, stdout io.Writer) error

func RequiresBuild

func RequiresBuild(projectInfo distgo.ProjectInfo, productParam distgo.ProductParam) (*distgo.ProductParam, error)

RequiresBuild returns a pointer to a distgo.ProductParam that contains only the OS/arch parameters for the outputs that require building. A product is considered to require building if its output executable does not exist or if the output executable's modification date is older than any of the Go files required to build the product. Returns nil if all of the outputs exist and are up-to-date.

func Run

func Run(projectInfo distgo.ProjectInfo, productParams []distgo.ProductParam, buildOpts Options, stdout io.Writer) error

Run builds the executables for the products specified by productParams using the options specified in buildOpts. If buildOpts.Parallel is true, then the products will be built in parallel with N workers, where N is the number of logical processors reported by Go. When builds occur in parallel, each (Product, OSArch) pair is treated as an individual unit of work. Thus, it is possible that different products may be built in parallel. If any build process returns an error, the first error returned is propagated back (and any builds that have not started will not be started).

Types

type Options

type Options struct {
	Parallel bool
	Install  bool
	DryRun   bool
}

Jump to

Keyboard shortcuts

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