jx: github.com/jenkins-x/jx/pkg/version Index | Files

package version

import "github.com/jenkins-x/jx/pkg/version"

Index

Package Files

info.go

Constants

const (
    // VersionPrefix string for setting pre-release etc
    VersionPrefix = ""

    // ExampleVersion shows an example version in the help
    // if no version could be found (which should never really happen!)
    ExampleVersion = "1.1.59"

    // TestVersion used in test cases for the current version if no
    // version can be found - such as if the version property is not properly
    // included in the go test flags
    TestVersion = "1.0.1"
)

Variables

var (
    Version   string
    Revision  string
    Branch    string
    BuildUser string
    BuildDate string
    GoVersion string
)

Build information. Populated at build-time.

var Map = map[string]string{
    "version":   Version,
    "revision":  Revision,
    "branch":    Branch,
    "buildUser": BuildUser,
    "buildDate": BuildDate,
    "goVersion": GoVersion,
}

Map provides the iterable version information.

func GetSemverVersion Uses

func GetSemverVersion() (semver.Version, error)

GetSemverVersion returns a semver.Version struct representing the current version

func GetVersion Uses

func GetVersion() string

GetVersion gets the current version string

func VersionStringDefault Uses

func VersionStringDefault(defaultValue string) string

VersionStringDefault returns the current version string or returns a dummy default value if there is an error

Package version imports 4 packages (graph) and is imported by 7 packages. Updated 2019-08-13. Refresh now. Tools for package owners.