1
0
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:
moelsayed
2019-02-27 01:14:01 +02:00
committed by Alena Prokharchyk
parent 2fa825f3fe
commit eb6116dded
5 changed files with 23 additions and 19 deletions

View File

@@ -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], ".")
}