Fix deprecated version check

This commit is contained in:
世界 2024-11-08 20:30:50 +08:00
parent 8df0aa5719
commit f1c76c4dde
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -24,10 +24,10 @@ func (n Note) Impending() bool {
return false
}
versionMinor := semver.Compare(semver.MajorMinor("v"+C.Version), "v"+n.ScheduledVersion)
if versionMinor < 0 {
if semver.Prerelease("v"+C.Version) == "" && versionMinor > 0 {
panic("invalid deprecated note: " + n.Name)
}
return versionMinor <= 1
return versionMinor >= -1
}
func (n Note) Message() string {