Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from opq-osc/beta
Browse files Browse the repository at this point in the history
update 升级功能
  • Loading branch information
mcoo authored Jun 1, 2021
2 parents 87fcd5d + 4620233 commit 391bdaa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ archives:
files:
- config.yaml.example
- LICENSE
- README.md
release:
prerelease: auto
checksum:
name_template: 'checksums.txt'
project_name: opqbot-manager
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 391bdaa

Please sign in to comment.