more lenient version comparison

This commit is contained in:
Jesse Duffield
2018-08-29 09:37:47 +10:00
parent 2181a91fea
commit cff1dee6dc

View File

@@ -88,6 +88,8 @@ func (u *Updater) majorVersionDiffers(oldVersion, newVersion string) bool {
if oldVersion == "unversioned" {
return false
}
oldVersion = strings.TrimPrefix(oldVersion, "v")
newVersion = strings.TrimPrefix(newVersion, "v")
return strings.Split(oldVersion, ".")[0] != strings.Split(newVersion, ".")[0]
}