From 46202330aa952885dfbce65bf28d4a7b464de7d5 Mon Sep 17 00:00:00 2001 From: mcoo <2435932516@qq.com> Date: Sat, 29 May 2021 12:07:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8D=87=E7=BA=A7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .goreleaser.yml | 3 +++ go.mod | 6 ++---- main.go | 2 +- update.go | 5 ++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index c547831..6ff57bc 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -32,6 +32,9 @@ archives: files: - config.yaml.example - LICENSE + - README.md +release: + prerelease: auto checksum: name_template: 'checksums.txt' project_name: opqbot-manager diff --git a/go.mod b/go.mod index 7e6b0e3..b6a268e 100644 --- a/go.mod +++ b/go.mod @@ -9,11 +9,9 @@ require ( github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/kataras/iris/v12 v12.2.0-alpha2.0.20210427211137-fa175eb84754 github.com/mcoo/OPQBot v0.1.5 - github.com/mcoo/requests v0.0.2 // indirect + github.com/mcoo/requests v0.0.2 github.com/robfig/cron/v3 v3.0.1 github.com/smartystreets/goconvey v1.6.4 // indirect golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b -) - -// replace github.com/mcoo/OPQBot => G:\Project\OPQBot +) \ No newline at end of file diff --git a/main.go b/main.go index 0004eef..312080c 100644 --- a/main.go +++ b/main.go @@ -42,7 +42,7 @@ type WebResult struct { var staticFs embed.FS func main() { - log.Println("QQ Group Manager✈️" + version) + log.Println("QQ Group Manager -️" + version) androidDns.SetDns() go CheckUpdate() b := OPQBot.NewBotManager(Config.CoreConfig.OPQBotConfig.QQ, Config.CoreConfig.OPQBotConfig.Url) diff --git a/update.go b/update.go index e4a8500..a2b2551 100644 --- a/update.go +++ b/update.go @@ -94,7 +94,10 @@ func CheckUpdate() { return } if !strings.HasSuffix(result.TagName, version) { - log.Println("检测到更新欧~ Ver " + result.TagName) + log.Println("检测到更新欧~ " + result.TagName) + if result.Prerelease { + log.Println("注意最新版本为预发行版本") + } downloadName := "opqbot-manager_" + runtime.GOOS + "_" + strings.ReplaceAll(strings.ReplaceAll(runtime.GOARCH, "386", "i386"), "amd64", "x86_64") for _, v := range result.Assets { if strings.HasPrefix(strings.ToLower(v.Name), downloadName) {