version

package
v3.73.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package version provides the agent version strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNumber added in v3.55.0

func BuildNumber() string

BuildNumber returns the build number of the CI pipeline that built the agent. You can override buildVersion at compile time by using the ldflag:

"-X github.com/buildkite/agent/v3/version.buildNumber=abc"

An easy way to test this is:

$ go run -buildvcs=true -ldflags "-X github.com/buildkite/agent/v3/version.buildNumber=abc" . --version

On CI, the binaries are always built with the buildVersion variable set.

func FullVersion added in v3.55.0

func FullVersion() string

FullVersion is a SemVer 2.0 compliant version string that includes [build metadata](https://semver.org/#spec-item-10) consisting of the build number (if any), the commit hash, and whether the build was made in a `dirty` working directory or not.

func UserAgent

func UserAgent() string

UserAgent returns a string suitable for use as a User-Agent header. TODO-vNext: Include some prefix of the commit hash in the User-Agent header.

func Version

func Version() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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