pkg

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedVersion indicates an unsupported Go builder version.
	ErrUnsupportedVersion = errors.New("unsupported version")

	// ErrInvalidDirectory indicates an invalid directory.
	ErrInvalidDirectory = errors.New("invalid directory")

	// ErrInvalidEnvironmentVariable indicates  an invalid environment variable.
	ErrInvalidEnvironmentVariable = errors.New("invalid environment variable")
)

Functions

func GenerateProvenance

func GenerateProvenance(name, digest, command, envs, workingDir string,
	s signing.Signer, r signing.TransparencyLog, provider slsa.ClientProvider,
) ([]byte, error)

GenerateProvenance translates github context into a SLSA provenance attestation. Spec: https://slsa.dev/provenance/v0.2

Types

type GoBuild

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

GoBuild implements building a Go application.

func GoBuildNew

func GoBuildNew(goc string, cfg *GoReleaserConfig) *GoBuild

GoBuildNew returns a new GoBuild.

func (*GoBuild) Run

func (b *GoBuild) Run(dry bool) error

Run executes the build.

func (*GoBuild) SetArgEnvVariables

func (b *GoBuild) SetArgEnvVariables(envs string) error

SetArgEnvVariables sets static environment variables.

type GoReleaserConfig

type GoReleaserConfig struct {
	Env     map[string]string
	Main    *string
	Dir     *string
	Goos    string
	Goarch  string
	Binary  string
	Flags   []string
	Ldflags []string
}

GoReleaserConfig tracks configuration for goreleaser.

func ConfigFromFile

func ConfigFromFile(path string) (*GoReleaserConfig, error)

ConfigFromFile reads the file located at path and builds a GoReleaserConfig from it.

Jump to

Keyboard shortcuts

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