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

This commit is contained in:
GoEdgeLab
2023-03-05 15:32:27 +08:00
parent 2ac7f6d14a
commit c74b1c3ceb
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
}