release

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package release builds the versioned, checksummed release artifacts (NFR-010): one ghtmx binary per supported platform, archived with the license and README, plus a sha256 checksums file. The version comes from the embedded .version file — the release workflow stamps it from the tag before building — so the binary, the module tag, and every component in the single module carry one version.

Index

Constants

This section is empty.

Variables

View Source
var Targets = []Target{
	{"linux", "amd64"},
	{"linux", "arm64"},
	{"darwin", "amd64"},
	{"darwin", "arm64"},
	{"windows", "amd64"},
	{"windows", "arm64"},
}

Targets is the supported platform matrix.

Functions

func Build

func Build(root, version, dst string) error

Build cross-compiles cmd/ghtmx for every target, packages each into an archive named ghtmx_<version>_<os>_<arch>, and writes checksums.txt (sha256sum format) over the archives. version is the tag form ("v1.2.3"); archive names carry it without the prefix.

func BuildOne

func BuildOne(root, dst, bare string, target Target) (string, error)

BuildOne builds and archives a single target, returning the archive name. The install-path check uses it for the running platform.

func Extract

func Extract(archive, dst string) error

Extract unpacks a release archive (tar.gz or zip) into dst, restoring the binary's executable bit — the same steps an installing user performs. Entries are flattened into dst (which also makes the extraction zip-slip-safe by construction); non-regular entries are skipped. The archives this package builds are flat regular files.

Types

type Target

type Target struct {
	GOOS   string
	GOARCH string
}

Target is one platform build.

Directories

Path Synopsis
Command cmd builds the release artifacts (used by the release workflow; tests exercise the same builder on every CI run).
Command cmd builds the release artifacts (used by the release workflow; tests exercise the same builder on every CI run).

Jump to

Keyboard shortcuts

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