project

package
v0.45.0 Latest Latest
Warning

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

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

Documentation

Overview

Package project carries the build identity of the agentlab binary: its version, git commit and build time. The generated Makefile (devctl) and the architect CI stamp them through `-ldflags -X`; a plain `go build` or `go install` has no ldflags and falls back to the module build info, which Go 1.24+ derives from the VCS tag of the checkout.

Index

Constants

View Source
const (
	Name   = "agentlab"
	Source = "https://github.com/giantswarm/agentlab"
)

Name and Source identify the project in messages and reports.

Variables

This section is empty.

Functions

func BuildTimestamp

func BuildTimestamp() string

BuildTimestamp returns the build (or, unstamped, the commit) time in RFC 3339, or "" when unknown.

func GitSHA

func GitSHA() string

GitSHA returns the commit the binary was built from, or "" when unknown.

func ModuleVersion added in v0.26.0

func ModuleVersion(path string) string

ModuleVersion is the version of a dependency this binary was built with ("v4.2.4"), read from the module list Go records in every build — a release, a `go install`, a `go build` from a checkout alike — so what the binary reports about the libraries it embeds is true for this very build. "" when the module is not part of the build or the binary carries no build info.

func ShortSHA added in v0.23.5

func ShortSHA() string

ShortSHA is GitSHA cut to the seven characters git shows, or "" when unknown — the build identifier the usage signal carries.

func Version

func Version() string

Version returns the agentlab version in the form the tags use ("v0.17.0"): the linker-stamped one when the binary came out of make or the release pipeline; else the module version Go recorded, which is the tag for `go install …@v0.17.0` and for a `go build` at the tag, a pseudo-version between tags, and carries "+dirty" over local edits; else "dev".

func VersionLine

func VersionLine() string

VersionLine is what `agentlab --version` prints after the name: "v0.17.0 (commit 8b5caa0, built 2026-09-07T10:00:00Z)".

Types

This section is empty.

Jump to

Keyboard shortcuts

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