build

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenBuildDate    = "${BUILD_DATE}"
	TokenArtifactName = "${ARTIFACT_NAME}"
)

Build dates in several formats.

View Source
var (
	AllTargets = []TargetSpec{
		targetWinAmd64,
		targetLinuxAmd64,
		targetLinuxArm,
		targetLinuxArm64,
	}
)

Predefined TargetSpecs

Functions

func Build

func Build(
	naming NamingSpec,
	targets []TargetSpec) ([]string, []error)

Build runs 'go build' for the named package and supplied target definitions. The resulting binary is stored in target specific subdirectories of the directory 'artifacts'.

func Test

func Test() error

Test runs 'go test' for all packages in the current module.

func TestAndBuild

func TestAndBuild(
	naming NamingSpec,
	targets []TargetSpec) ([]string, []error)

TestAndBuild performs the standard build process.

Types

type NamingSpec

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

func NewNamingSpec

func NewNamingSpec(
	packageName string,
	artifactBaseName string) NamingSpec

func (NamingSpec) GetArtifactFile

func (naming NamingSpec) GetArtifactFile() string

func (NamingSpec) GetArtifactName

func (naming NamingSpec) GetArtifactName() string

func (NamingSpec) GetVersionInfo

func (naming NamingSpec) GetVersionInfo() string

func (NamingSpec) WithNameParts

func (naming NamingSpec) WithNameParts(newNameParts []string) NamingSpec

func (NamingSpec) WithTarget

func (naming NamingSpec) WithTarget(target TargetSpec) NamingSpec

type TargetSpec

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

func GetTargets

func GetTargets(filters []string) ([]TargetSpec, []string)

func (TargetSpec) Desc

func (target TargetSpec) Desc() string

func (TargetSpec) Env

func (target TargetSpec) Env() []string

Env returns a list of environment variables for the Go compiler based on the TargetSpec.

Jump to

Keyboard shortcuts

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