1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-24 17:07:00 +02:00

updated ghupdate to prevent downloading unnecessary v0.23+ since it contains breaking changes

This commit is contained in:
Gani Georgiev 2024-10-18 16:06:24 +03:00
parent 3786e0816d
commit e18ea88113

View File

@ -164,6 +164,11 @@ func (p *plugin) update(withBackup bool) error {
return nil return nil
} }
if compareVersions(strings.TrimPrefix(latest.Tag, "v"), "0.23.0") <= 0 {
color.Green("%s contains breaking changes and cannot be updated directly from v0.22.x. Please check the releases CHANGELOG for more details.", latest.Tag)
return nil
}
suffix := archiveSuffix(runtime.GOOS, runtime.GOARCH) suffix := archiveSuffix(runtime.GOOS, runtime.GOARCH)
if suffix == "" { if suffix == "" {
return errors.New("unsupported platform") return errors.New("unsupported platform")