Documentation ¶
Index ¶
- func Products(projectInfo distgo.ProjectInfo, projectParam distgo.ProjectParam, ...) error
- func RequiresBuild(projectInfo distgo.ProjectInfo, productParam distgo.ProductParam) (*distgo.ProductParam, error)
- func Run(projectInfo distgo.ProjectInfo, productParams []distgo.ProductParam, ...) error
- type Options
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).