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

Commit

Permalink
add UPX压缩
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoo committed Jun 18, 2021
1 parent a13cf5d commit 955e4de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ builds:
- goos: android
goarch: 386
hooks:
post: upx {{ .Path }}
post:
- cmd: ./upx.sh "{{ .Os }}" "{{ .Path }}"
archives:
-
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import (
)

var (
version = "Ver.0.0.1"
version = "unknown"
date = "none"
sess *sessions.Sessions
)

Expand All @@ -51,9 +52,9 @@ type WebResult struct {
var staticFs embed.FS

func main() {
log.Println("QQ Group Manager -️" + version)
log.Println("QQ Group Manager -️" + version + " 编译时间 " + date)
androidDns.SetDns()
//go CheckUpdate()
go CheckUpdate()
app := iris.New()
b := OPQBot.NewBotManager(Config.CoreConfig.OPQBotConfig.QQ, Config.CoreConfig.OPQBotConfig.Url)
err := b.AddEvent(OPQBot.EventNameOnDisconnected, func() {
Expand Down
7 changes: 7 additions & 0 deletions upx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo $1 $2
if [ "$1" != "android" ]; then
upx $2;
fi
exit 0;

0 comments on commit 955e4de

Please sign in to comment.