mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 13:29:53 +00:00
feat: better version handling for update check
This commit is contained in:
parent
a7675b2f5b
commit
508ff69ea9
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user