From a5fb3aea3693009dff44667b9547950e9c7b7d62 Mon Sep 17 00:00:00 2001 From: dengsgo Date: Sun, 30 Sep 2018 09:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- build-darwin.bat | 2 +- build-linux.bat | 2 +- build-windows.bat | 2 +- fileboy.go | 5 +++++ raw.go | 2 ++ 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e2054e..e7a33cc 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ go version >=1.10,推荐 1.11 ### 下载二进制文件 -Github: [正式版 v1.1](https://github.com/dengsgo/fileboy/releases) -Gitee: [正式版 v1.1](https://gitee.com/dengsgo/fileboy/releases) +Github: [正式版 v1.2](https://github.com/dengsgo/fileboy/releases) +Gitee: [正式版 v1.2](https://gitee.com/dengsgo/fileboy/releases) 下载已经编译好的对应平台二进制文件,重命名为`fileboy`, 加入系统 Path 中即可。 diff --git a/build-darwin.bat b/build-darwin.bat index 62301b8..ab036fc 100644 --- a/build-darwin.bat +++ b/build-darwin.bat @@ -3,6 +3,6 @@ echo build start... SET CGO_ENABLED=0 SET GOOS=darwin SET GOARCH=amd64 -go build -ldflags "-s -w" +go build -ldflags "-s -w" -o fileboy-darwin-amd64.bin echo build success pause \ No newline at end of file diff --git a/build-linux.bat b/build-linux.bat index a729cf5..f0cba5f 100644 --- a/build-linux.bat +++ b/build-linux.bat @@ -3,6 +3,6 @@ echo build start... SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 -go build -ldflags "-s -w" +go build -ldflags "-s -w" -o fileboy-linux-amd64.bin echo build success pause \ No newline at end of file diff --git a/build-windows.bat b/build-windows.bat index 54df2ba..2c60a83 100644 --- a/build-windows.bat +++ b/build-windows.bat @@ -3,6 +3,6 @@ echo build start... SET CGO_ENABLED=0 SET GOOS=windows SET GOARCH=amd64 -go build -ldflags "-s -w" +go build -ldflags "-s -w" -o fileboy-windows-amd64.exe echo build success pause \ No newline at end of file diff --git a/fileboy.go b/fileboy.go index dc00985..02da576 100644 --- a/fileboy.go +++ b/fileboy.go @@ -12,6 +12,7 @@ import ( "os" "os/exec" "path" + "strconv" "sync" "time" ) @@ -230,6 +231,10 @@ func parseArgs() { parseConfig() run(new(changeFile)) return + case "version": + fallthrough + case "v": + fmt.Println("[VERSION] Release: v1.2 filegirl: " + strconv.Itoa(Version)) default: fmt.Print(helpStr) } diff --git a/raw.go b/raw.go index 82f4230..12c9b4d 100644 --- a/raw.go +++ b/raw.go @@ -60,6 +60,8 @@ Usage of fileboy: 初始化 fileboy, 在当前目录生成 filegirl.yaml 配置文件 exec 尝试运行定义的 command 命令 + version + 查看当前版本号 ` var englishSay = []string{