buildinfo

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Overview

Package buildinfo provides build-time version information.

Variables are set via ldflags during build:

go build -ldflags "-X github.com/stacktower-io/stacktower/pkg/buildinfo.Version=v1.0.0 \
    -X github.com/stacktower-io/stacktower/pkg/buildinfo.Commit=$(git rev-parse HEAD) \
    -X github.com/stacktower-io/stacktower/pkg/buildinfo.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "v1.2.3").
	// Set via ldflags: -X github.com/stacktower-io/stacktower/pkg/buildinfo.Version=...
	Version = "dev"

	// Commit is the git commit SHA.
	// Set via ldflags: -X github.com/stacktower-io/stacktower/pkg/buildinfo.Commit=...
	Commit = "none"

	// Date is the build timestamp.
	// Set via ldflags: -X github.com/stacktower-io/stacktower/pkg/buildinfo.Date=...
	Date = "unknown"

	// GitHubAppClientID is the OAuth client ID for GitHub device flow authentication.
	// Set via ldflags or override at runtime with STACKTOWER_GITHUB_APP_CLIENT_ID.
	GitHubAppClientID = ""

	// GitHubAppSlug is the GitHub App slug for installation URLs.
	// Set via ldflags or override at runtime with STACKTOWER_GITHUB_APP_SLUG.
	GitHubAppSlug = ""

	// CompiledGitHubAppClientID is the OAuth client ID embedded at build time.
	// This value is captured before runtime env var overrides are applied.
	CompiledGitHubAppClientID = ""

	// CompiledGitHubAppSlug is the app slug embedded at build time.
	// This value is captured before runtime env var overrides are applied.
	CompiledGitHubAppSlug = ""
)

Functions

func String

func String() string

String returns the formatted build information.

func Template

func Template() string

Template returns the version template string for cobra.

Types

This section is empty.

Jump to

Keyboard shortcuts

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