Documentation ¶
Index ¶
- Constants
- Variables
- func GetDependencyVersionInfo(pkgName string, toml *TomlWrapper) (*dep.VersionInfo, error)
- func GetGitVersion(relativeRepoDir string) (string, error)deprecated
- func GetImageVersion(version *Version) string
- func GetTag(version string) stringdeprecated
- func GetTomlVersion(pkgName string, toml *TomlWrapper) (string, error)deprecated
- func GetVersion(pkgName string, tomlTree []*toml.Tree) (string, error)deprecated
- func GetVersionFromTag(shouldBeAVersion string) (string, error)
- func IsGreaterThanTag(greaterTag, lesserTag string) (bool, error)
- func MatchesRegex(tag string) bool
- func ParseToml() ([]*toml.Tree, error)deprecated
- func ParseTomlFromDir(relativeDir string) ([]*toml.Tree, error)deprecated
- func ParseTomlOverrides() ([]*toml.Tree, error)deprecated
- func ParseTomlOverridesFromDir(relativeDir string) ([]*toml.Tree, error)deprecated
- func PinGitVersion(relativeRepoDir string, semVerVersion string) errordeprecated
- type TomlWrapper
- type Version
Constants ¶
View Source
const ( SemverNilVersionValue = "v0.0.0" SemverMinimumVersion = "v0.0.1" )
SemverLowerBound is the "nil" value for changelog versions It is not itself a valid version but it allows us to use our semver validation on the v0.0.1 edge case
Variables ¶
View Source
var ( UnableToFindVersionInTomlError = func(pkgName string) error { return fmt.Errorf("unable to find version for %s in toml", pkgName) } FailedCommandError = func(err error, args []string, output string) error { return errors.Wrapf(err, "%v failed: %s", args, output) } )
View Source
var ( Zero = Version{ Major: 0, Minor: 0, Patch: 0, } StableApiVersion = Version{ Major: 1, Minor: 0, Patch: 0, } )
Functions ¶
func GetDependencyVersionInfo ¶ added in v0.10.8
func GetDependencyVersionInfo(pkgName string, toml *TomlWrapper) (*dep.VersionInfo, error)
Returns the version of the given package together with the type of version identifier, i.e. revision, version, branch.
func GetGitVersion
deprecated
func GetImageVersion ¶ added in v0.9.7
func GetTomlVersion
deprecated
func GetTomlVersion(pkgName string, toml *TomlWrapper) (string, error)
Deprecated: use GetDependencyVersionInfo
func GetVersion
deprecated
func GetVersionFromTag ¶
func IsGreaterThanTag ¶
func MatchesRegex ¶
func ParseTomlFromDir
deprecated
func ParseTomlOverrides
deprecated
func ParseTomlOverrides() ([]*toml.Tree, error)
Deprecated: Use ParseFullToml instead
func ParseTomlOverridesFromDir
deprecated
func PinGitVersion
deprecated
Types ¶
type TomlWrapper ¶
type TomlWrapper struct { Overrides []*toml.Tree Constraints []*toml.Tree }
func ParseFullToml ¶
func ParseFullToml() (*TomlWrapper, error)
func ParseFullTomlFromDir ¶
func ParseFullTomlFromDir(relativeDir string) (*TomlWrapper, error)
type Version ¶
func GetReleaseVersionOrExitGracefully ¶
func GetReleaseVersionOrExitGracefully() *Version
func NewVersion ¶
func ParseVersion ¶
func (*Version) IncrementVersion ¶
func (*Version) IsGreaterThan ¶
func (*Version) IsGreaterThanOrEqualTo ¶
Click to show internal directories.
Click to hide internal directories.