version

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version centralizes build-identity reporting for cmd/mast and any surface that advertises the build (attach capabilities frames, agent cards). Version is overridable at release time via -ldflags; plain `go build` reports the "dev" fallback.

GoReleaser injects the real tag via .goreleaser.yaml's ldflags entry — keep that path in sync when moving this variable.

Index

Constants

This section is empty.

Variables

View Source
var (
	Commit = ""
	Date   = ""
)

Commit and Date are the short commit and commit date of a release build, empty for a local one; `mast --version` prints them when set. They lived in package main until the binary moved into internal/cli (#301), where an `-X main.commit=` flag would have stamped nothing and nothing would have failed — so they sit here beside Version, and a custom main.go built with the same ldflags reports the same identity.

View Source
var Version = "dev"

Version is the semver tag for released builds, or "dev" for in-development builds. GoReleaser overrides it with the release tag via -ldflags at build time.

A build nobody stamped still knows its version when the Go toolchain recorded one, and init reads it: `go install github.com/go-steer/mast/cmd/mast@v1.0.0` records v1.0.0 as the main module's version, and a custom main.go records the mast module it was built against as a dependency. Both printed "dev" until v1.0.0-rc.2 — the release tarballs were the only builds that could say what they were. A checkout's own `go build` stays "dev" (see fromBuildInfo).

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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