Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TempDir string
Functions ¶
Types ¶
type Common ¶
type Common struct { CommonBase `yaml:"base,omitempty,inline,flow"` Disabled bool `yaml:"disabled,omitempty"` KeepWorkdir bool `yaml:"keep-workdir,omitempty"` UseWorkDir string `yaml:"use-workdir,omitempty"` For []string `yaml:"for,omitempty,flow"` Os []string `yaml:"os,omitempty,flow"` Arch []string `yaml:"arch,omitempty,flow"` Goroot string `yaml:"goroot,omitempty,flow"` PreAction string `yaml:"pre-action,omitempty"` // bash script PostAction string `yaml:"post-action,omitempty"` // bash script PreActionFile string `yaml:"pre-action-file,omitempty"` // bash script PostActionFile string `yaml:"post-action-file,omitempty"` // bash script }
type CommonBase ¶
type CommonBase struct { OS string `yaml:"-"` // just for string template expansion ARCH string `yaml:"-"` // just for string template expansion Ldflags []string `yaml:"ldflags,omitempty,flow"` // default ldflags is to get the smaller build for releasing Asmflags []string `yaml:"asmflags,omitempty,flow"` // Gcflags []string `yaml:"gcflags,omitempty,flow"` // Gccgoflags []string `yaml:"gccgoflags,omitempty,flow"` // Tags []string `yaml:"tags,omitempty,flow"` // // Cgo option Cgo bool `yaml:",omitempty"` // // Race option enables data race detection. // Supported only on linux/amd64, freebsd/amd64, darwin/amd64, windows/amd64, // linux/ppc64le and linux/arm64 (only for 48-bit VMA). Race bool `yaml:",omitempty"` // // Msan option enables interoperation with memory sanitizer. // Supported only on linux/amd64, linux/arm64 // and only with Clang/LLVM as the host C compiler. // On linux/arm64, pie build mode will be used. Msan bool `yaml:",omitempty"` // Gocmd string `yaml:",omitempty"` // -gocmd go Gen bool `yaml:",omitempty"` // go generate at first? Install bool `yaml:",omitempty"` // install binary to $GOPATH/bin like 'go install' ? Debug bool `yaml:",omitempty"` // true to produce a larger build with debug info DisableResult bool `yaml:"disable-result,omitempty"` // no ll (Shell list) building result // -X for -ldflags, // -X importpath.name=value // Set the value of the string variable in importpath named name to value. // Note that before Go 1.5 this option took two separate arguments. // Now it takes one argument split on the first = sign. Extends []PackageNameValues `yaml:"extends,omitempty"` // CmdrSpecials bool `yaml:"cmdr,omitempty"` }
func (*CommonBase) CloneFrom ¶
func (c *CommonBase) CloneFrom(from *CommonBase)
type Context ¶
type Context struct { WorkDir string TempDir string PackageDir string // Output collects the target binary executable path pieces in building Output PathPieces *Common *Info *DynBuildInfo }
func NewContext ¶
func NewContext() *Context
type DynBuildInfo ¶
type Info ¶
type Info struct { GoVersion string // the result from 'go version' GitVersion string // the result from 'git describe --tags --abbrev=0' GitRevision string // revision, git hash code, from 'git rev-parse --short HEAD' BuildTime string // GOOS string // a copy from runtime.GOOS GOARCH string // a copy from runtime.GOARCH GOVERSION string // a copy from runtime.Version() RandomString string RandomInt int Serial int }
func NewBuildInfo ¶
func NewBuildInfo() *Info
type PackageNameValues ¶
type PathPieces ¶
func (*PathPieces) Set ¶
func (s *PathPieces) Set(file string)
type TargetPlatforms ¶
type TargetPlatforms struct { // OsArchMap is a map by key OS and CPUArch OsArchMap map[string]map[string]bool `yaml:"os-arch-map"` // Sources is a map by key PackageName Sources map[string]*DynBuildInfo `yaml:"sources"` }
func NewTargetPlatforms ¶
func NewTargetPlatforms() *TargetPlatforms
func (*TargetPlatforms) FilterBy ¶
func (ss *TargetPlatforms) FilterBy(scope string, forSlice, osSlice, archSlice []string)
func (*TargetPlatforms) SetOsArch ¶
func (ss *TargetPlatforms) SetOsArch(os, arch string)
Click to show internal directories.
Click to hide internal directories.