From cbaca91581e55451e555a46f8ad1e11534577d62 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sun, 21 May 2023 13:00:12 +0300 Subject: [PATCH] ignore the v prefix when comparing the tag and the current version --- plugins/ghupdate/ghupdate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/ghupdate/ghupdate.go b/plugins/ghupdate/ghupdate.go index 9fff819f..bdd46348 100644 --- a/plugins/ghupdate/ghupdate.go +++ b/plugins/ghupdate/ghupdate.go @@ -14,6 +14,7 @@ import ( "path" "path/filepath" "runtime" + "strings" "github.com/fatih/color" "github.com/pocketbase/pocketbase/core" @@ -137,7 +138,7 @@ func (p *plugin) update(withBackup bool) error { return err } - if p.currentVersion >= latest.Tag { + if strings.TrimPrefix(p.currentVersion, "v") >= strings.TrimPrefix(latest.Tag, "v") { color.Green("You already have the latest PocketBase %s.", p.currentVersion) return nil }