From 508ff69ea96d5a06d563955284fc0b46fa9e6ad0 Mon Sep 17 00:00:00 2001 From: Toby Date: Thu, 3 Nov 2022 19:50:42 +0000 Subject: [PATCH] feat: better version handling for update check --- cmd/update.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/update.go b/cmd/update.go index b972f3b..3284e80 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,6 +4,7 @@ import ( "encoding/json" "io/ioutil" "net/http" + "strings" "time" "github.com/sirupsen/logrus" @@ -19,8 +20,9 @@ type releaseInfo struct { } func checkUpdate() { + sv := strings.Split(appVersion, "-")[0] info, err := fetchLatestRelease() - if err == nil && info.TagName != appVersion { + if err == nil && info.TagName != sv { logrus.WithFields(logrus.Fields{ "version": info.TagName, "url": info.URL,