release

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package release owns the build, test, package, and publish lifecycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentInventoryHead

func CurrentInventoryHead(ctx context.Context, runner pkgit.Runner) (string, error)

CurrentInventoryHead fetches the remote default branch at reconciliation time. Reading FETCH_HEAD pins the accepted snapshot independently of a queued run's older checkout. Callers serialize publication before invoking this function.

func Run

func Run(ctx context.Context, directory string, backend Backend, options ...Option) (*pluginoci.Release, error)

Run validates source, builds all targets, tests the host target, and publishes a verified layout. Temporary layouts are removed on success and failure.

func RunInventory

func RunInventory(ctx context.Context, entries []releaseplan.Entry, factory BackendFactory, options ...InventoryOption) ([]*pluginoci.Release, error)

RunInventory processes packages in plan order, using detached source snapshots. Target compilation remains bounded and parallel within each package. The caller retains its checkout, including uncommitted files, throughout the operation.

Types

type Backend

type Backend interface {
	Validate(context.Context, string) error
	Build(context.Context, string) error
	Test(context.Context, string) error
	Pack(context.Context, string, string) error
	Publish(context.Context, string) (*pluginoci.Release, error)
}

Backend supplies the release operations. Test must execute only the current host's binary; Pack verifies the payloads for every declared platform.

type BackendFactory

type BackendFactory func(releaseplan.Entry, string) Backend

BackendFactory binds publication settings and the isolated repository to a package.

type InventoryOption

type InventoryOption func(*inventorySettings)

InventoryOption configures execution of committed inventory entries.

func WithInventoryCheck

func WithInventoryCheck(check bool) InventoryOption

WithInventoryCheck checks packages without publishing them.

func WithInventoryRunner

func WithInventoryRunner(runner pkgit.Runner) InventoryOption

WithInventoryRunner injects repository access.

func WithInventoryTemporaryDirectory

func WithInventoryTemporaryDirectory(directory string) InventoryOption

WithInventoryTemporaryDirectory selects the parent of isolated source trees.

type Option

type Option func(*settings)

Option configures local release staging.

func WithCheck

func WithCheck(check bool) Option

WithCheck verifies the complete layout without publishing or signing it.

func WithTemporaryDirectory

func WithTemporaryDirectory(directory string) Option

WithTemporaryDirectory selects the parent for temporary layouts.

Jump to

Keyboard shortcuts

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