version

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package version reports the build identity stamped into the operator binaries at link time.

Index

Constants

View Source
const DevVersion = "v0.0.0-dev"

DevVersion marks a build that was not stamped by the release pipeline.

View Source
const Development = false

Development reports whether the build has the aicr_operator_development tag.

Variables

View Source
var (
	// Version is the semantic version the build was cut from, or the
	// development default when built without a release stamp.
	Version = DevVersion
	// Commit is the full source commit the build was produced from.
	Commit = "unknown"
	// Date is the build timestamp in RFC 3339 form.
	Date = "unknown"
)

Set at link time with -ldflags "-X <module>/pkg/operator/version.Version=...".

Functions

func IsRelease

func IsRelease(v string) bool

IsRelease reports whether v is a version the release pipeline stamps. Development-only behavior, such as the approval bypass, is refused by any build for which this returns true.

Types

type Info

type Info struct {
	Version     string `json:"version"`
	Commit      string `json:"commit"`
	Date        string `json:"date"`
	GoVersion   string `json:"goVersion"`
	Release     bool   `json:"release"`
	Development bool   `json:"development"`
}

Info is the build identity in a form suitable for logs and metrics.

func Get

func Get() Info

Get returns the identity of the running binary.

func (Info) AcceptsDevelopment

func (i Info) AcceptsDevelopment() bool

AcceptsDevelopment reports whether the build accepts development settings, which requires Development without Release.

Jump to

Keyboard shortcuts

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