mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-22 05:54:42 -04:00
cli: fail fast when CLI and Constellation versions don't match (#1972)
* fail on version mismatch * rename to validateCLIandConstellationVersionAreEqual * fix test * image version must only be major,minor patch equal (ignore suffix) * add version support doc * fix: do not check patch version equality for image and cli * skip validate on force
This commit is contained in:
parent
90ffcd17e8
commit
1edbe962c1
6 changed files with 140 additions and 2 deletions
|
@ -68,6 +68,11 @@ func (v Semver) Compare(other Semver) int {
|
|||
return semver.Compare(v.String(), other.String())
|
||||
}
|
||||
|
||||
// MajorMinorEqual returns if the major and minor version of two versions are equal.
|
||||
func (v Semver) MajorMinorEqual(other Semver) bool {
|
||||
return v.Major == other.Major && v.Minor == other.Minor
|
||||
}
|
||||
|
||||
// IsUpgradeTo returns if a version is an upgrade to another version.
|
||||
// It checks if the version of v is greater than the version of other and allows a drift of at most one minor version.
|
||||
func (v Semver) IsUpgradeTo(other Semver) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue