apisigs.k8s.io/kustomize/api/provenance Index | Files

package provenance

import "sigs.k8s.io/kustomize/api/provenance"

Index

Constants

const (

	// ModulePath is kustomize module path, defined in kustomize/go.mod
	ModulePath = "sigs.k8s.io/kustomize/kustomize/v5"
)

Functions

func FindVersion

func FindVersion(info *debug.BuildInfo, version string) string

FindVersion searches for a version in the depth of dependencies including replacements, otherwise, it tries to get version from debug.BuildInfo Main.

func GetMostRecentTag

func GetMostRecentTag(m debug.Module) (string, error)

Types

type Provenance

type Provenance struct {
	// Version of the kustomize binary.
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	// GitCommit is a git commit
	GitCommit string `json:"gitCommit,omitempty" yaml:"gitCommit,omitempty"`
	// BuildDate is date of the build.
	BuildDate string `json:"buildDate,omitempty" yaml:"buildDate,omitempty"`
	// GoOs holds OS name.
	GoOs string `json:"goOs,omitempty" yaml:"goOs,omitempty"`
	// GoArch holds architecture name.
	GoArch string `json:"goArch,omitempty" yaml:"goArch,omitempty"`
	// GoVersion holds Go version.
	GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"`
}

Provenance holds information about the build of an executable.

func GetProvenance

func GetProvenance() Provenance

GetProvenance returns an instance of Provenance.

func (Provenance) Semver

func (v Provenance) Semver() string

Semver returns the semantic version of kustomize. kustomize version is set in format "kustomize/vX.X.X" in every release. X.X.X is a semver. If the version string is not in this format, return the original version string

func (Provenance) Short

func (v Provenance) Short() string

Short returns the shortened provenance stamp.

Source Files

provenance.go

Version
v0.20.1 (latest)
Published
Jul 23, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
15 hours ago

Tools for package owners.