mirror of
https://github.com/rancher/rke.git
synced 2025-09-02 15:34:36 +00:00
Fix versioned templates version check
This commit is contained in:
committed by
Alena Prokharchyk
parent
2fa825f3fe
commit
eb6116dded
@@ -133,3 +133,11 @@ func IsRancherBackupSupported(image string) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetTagMajorVersion(tag string) string {
|
||||
splitTag := strings.Split(tag, ".")
|
||||
if len(splitTag) < 2 {
|
||||
return ""
|
||||
}
|
||||
return strings.Join(splitTag[:2], ".")
|
||||
}
|
||||
|
Reference in New Issue
Block a user