release

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: 0BSD Imports: 20 Imported by: 0

Documentation

Overview

Package release builds deterministic prototype release artifacts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	File   string `json:"file"`
	GOOS   string `json:"goos"`
	GOARCH string `json:"goarch"`
	SHA256 string `json:"sha256"`
	Size   int64  `json:"size"`
}

Artifact records one archived binary and its content identity.

type Manifest

type Manifest struct {
	SchemaVersion  int        `json:"schema_version"`
	Product        string     `json:"product"`
	Version        string     `json:"version"`
	SourceRevision string     `json:"source_revision"`
	GoVersion      string     `json:"go_version"`
	Artifacts      []Artifact `json:"artifacts"`
}

Manifest binds release artifacts to source, version, and build toolchain.

func Build

func Build(ctx context.Context, options Options) (manifest Manifest, resultErr error)

Build creates one new output directory containing archived binaries, a canonical manifest, and sorted SHA-256 checksums. It removes the directory if any step fails and never overwrites an existing path.

type Options

type Options struct {
	Root           string
	Output         string
	Version        string
	SourceRevision string
	GoBinary       string
	GitBinary      string
	Targets        []Target
}

Options selects one deterministic release build.

type Target

type Target struct {
	GOOS   string `json:"goos"`
	GOARCH string `json:"goarch"`
}

Target identifies one release operating system and architecture.

func DefaultTargets

func DefaultTargets() []Target

DefaultTargets returns the admitted prototype release targets.

Jump to

Keyboard shortcuts

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