version

package
v0.0.0-...-2fd6ff6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: AGPL-3.0 Imports: 9 Imported by: 450

Documentation

Overview

Package version contains versioning information for juju. It also acts as guardian of the current client Juju version number.

Index

Constants

View Source
const (
	// TreeStateDirty when the build was made with a dirty checkout.
	TreeStateDirty = "dirty"
	// TreeStateClean when the build was made with a clean checkout.
	TreeStateClean = "clean"
	// TreeStateArchive when the build was made outside of a git checkout.
	TreeStateArchive = "archive"
)
View Source
const UserAgentVersion = "Juju/" + version

UserAgentVersion defines a user agent version used for communication for outside resources.

Variables

View Source
var Compiler = runtime.Compiler

Compiler is the go compiler used to build the binary.

View Source
var Current = semversion.MustParse(version)

Current gives the current version of the system. If the file "FORCE-VERSION" is present in the same directory as the running binary, it will override this.

View Source
var GitCommit string

GitCommit represents the git commit sha used to build the binary. Generated by the Makefile.

View Source
var GitTreeState string = TreeStateDirty

GitTreeState is "clean" when built from a working copy that matches the GitCommit treeish. Generated by the Makefile.

View Source
var GoBuildTags string

GoBuildTags is the build tags used to build the binary.

View Source
var OfficialBuild = mustParseBuildInt(build)

OfficialBuild is a monotonic number injected by Jenkins.

Functions

func CheckJujuMinVersion

func CheckJujuMinVersion(toCheck semversion.Number, jujuVersion semversion.Number) (err error)

CheckJujuMinVersion returns an error if the specified version to check is less than the current Juju version.

func DefaultSupportedLTS

func DefaultSupportedLTS() string

DefaultSupportedLTS returns the latest LTS that Juju supports and is compatible with.

func DefaultSupportedLTSBase

func DefaultSupportedLTSBase() corebase.Base

DefaultSupportedLTSBase returns the latest LTS base that Juju supports and is compatible with.

func IsDev

func IsDev(v semversion.Number) bool

IsDev returns whether the version represents a development version. A version with a tag or a nonzero build component is considered to be a development version. Versions older than or equal to 1.19.3 (the switch over time) check for odd minor versions.

func IsMinVersionError

func IsMinVersionError(err error) bool

IsMinVersionError returns true if the given error was caused by the charm having a minjujuversion higher than the juju model's version.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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