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 ¶
var Targets = []Target{
{"linux", "amd64"},
{"linux", "arm64"},
{"darwin", "amd64"},
{"darwin", "arm64"},
{"windows", "amd64"},
{"windows", "arm64"},
}
Targets is the supported platform matrix.
Functions ¶
func ArchiveName ¶ added in v0.1.7
ArchiveName is the release asset name for one target, extension included: ghtmx_<bare>_<os>_<arch> with .zip on Windows and .tar.gz elsewhere. bare is the version without the "v" prefix. This is the single definition of the naming convention — the release build, the install-path check, and scripts/install.sh all depend on it, and a change here changes what users download.
func Build ¶
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 ¶
BuildOne builds and archives a single target, returning the archive name. The install-path check uses it for the running platform.
func Extract ¶
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.