远程升级API节点限制版本号必须不小于0.6.4

This commit is contained in:
刘祥超
2023-03-05 15:32:27 +08:00
parent 52bb753594
commit bc6de68006
2 changed files with 5 additions and 1 deletions

View File

@@ -20,6 +20,10 @@ func CanUpgrade(apiVersion string, osName string, arch string) (canUpgrade bool,
return false, "current api version should not be empty"
}
if stringutil.VersionCompare(apiVersion, "0.6.4") < 0 {
return false, "api node version must greater than or equal to 0.6.4"
}
if osName != runtime.GOOS {
return false, "os not match: " + osName
}