consistently use Masterminds/semver (#1209)

This commit is contained in:
Cyril Jouve 2023-12-10 12:05:07 +01:00 committed by GitHub
parent 017bcf22ae
commit 9f2264ce24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

2
go.mod
View File

@ -51,7 +51,7 @@ require (
github.com/a8m/envsubst v1.3.0 // indirect
github.com/aws/aws-sdk-go v1.48.15
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fujiwara/tfstate-lookup v1.1.5 // indirect

View File

@ -1,7 +1,7 @@
package testutil
import (
"github.com/blang/semver"
"github.com/Masterminds/semver/v3"
"helm.sh/helm/v3/pkg/chart"
"github.com/helmfile/helmfile/pkg/helmexec"
@ -35,7 +35,7 @@ func (helm *V3HelmExec) IsHelm3() bool {
func (helm *VersionHelmExec) IsVersionAtLeast(ver string) bool {
currentSemVer := semver.MustParse(helm.version)
verSemVer := semver.MustParse(ver)
return currentSemVer.GTE(verSemVer)
return currentSemVer.Compare(verSemVer) >= 0
}
func (helm *noCallHelmExec) doPanic() {