Skip to content

Commit

Permalink
fix(version): split version string to segregate version from tags (#120)
Browse files Browse the repository at this point in the history
fixes the version check for valid desired version which needs to be split
from the tags in the version string. 

Example: 1.11.0-RC1 needs to split  and 1.11.0 is the actual version

Signed-off-by: shubham <[email protected]>
  • Loading branch information
shubham14bajpai authored Jul 7, 2020
1 parent e5d2788 commit 96dc8a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/version/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

var (
validCurrentVersions = map[string]bool{
"1.9.0": true, "1.10.0": true,
"1.9.0": true, "1.10.0": true, "1.11.0": true,
}
validDesiredVersion = GetVersion()
validDesiredVersion = strings.Split(GetVersion(), "-")[0]
)

// IsCurrentVersionValid verifies if the current version is valid or not
Expand Down

0 comments on commit 96dc8a7

Please sign in to comment.