修改 编译脚本

This commit is contained in:
dengsgo 2018-09-30 09:43:14 +08:00
parent cae4bf355e
commit a5fb3aea36
6 changed files with 12 additions and 5 deletions

View File

@ -17,8 +17,8 @@ go version >=1.10,推荐 1.11
### 下载二进制文件 ### 下载二进制文件
Github: [正式版 v1.1](https://github.com/dengsgo/fileboy/releases) Github: [正式版 v1.2](https://github.com/dengsgo/fileboy/releases)
Gitee: [正式版 v1.1](https://gitee.com/dengsgo/fileboy/releases) Gitee: [正式版 v1.2](https://gitee.com/dengsgo/fileboy/releases)
下载已经编译好的对应平台二进制文件,重命名为`fileboy`, 加入系统 Path 中即可。 下载已经编译好的对应平台二进制文件,重命名为`fileboy`, 加入系统 Path 中即可。

View File

@ -3,6 +3,6 @@ echo build start...
SET CGO_ENABLED=0 SET CGO_ENABLED=0
SET GOOS=darwin SET GOOS=darwin
SET GOARCH=amd64 SET GOARCH=amd64
go build -ldflags "-s -w" go build -ldflags "-s -w" -o fileboy-darwin-amd64.bin
echo build success echo build success
pause pause

View File

@ -3,6 +3,6 @@ echo build start...
SET CGO_ENABLED=0 SET CGO_ENABLED=0
SET GOOS=linux SET GOOS=linux
SET GOARCH=amd64 SET GOARCH=amd64
go build -ldflags "-s -w" go build -ldflags "-s -w" -o fileboy-linux-amd64.bin
echo build success echo build success
pause pause

View File

@ -3,6 +3,6 @@ echo build start...
SET CGO_ENABLED=0 SET CGO_ENABLED=0
SET GOOS=windows SET GOOS=windows
SET GOARCH=amd64 SET GOARCH=amd64
go build -ldflags "-s -w" go build -ldflags "-s -w" -o fileboy-windows-amd64.exe
echo build success echo build success
pause pause

View File

@ -12,6 +12,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path" "path"
"strconv"
"sync" "sync"
"time" "time"
) )
@ -230,6 +231,10 @@ func parseArgs() {
parseConfig() parseConfig()
run(new(changeFile)) run(new(changeFile))
return return
case "version":
fallthrough
case "v":
fmt.Println("[VERSION] Release: v1.2 filegirl: " + strconv.Itoa(Version))
default: default:
fmt.Print(helpStr) fmt.Print(helpStr)
} }

2
raw.go
View File

@ -60,6 +60,8 @@ Usage of fileboy:
初始化 fileboy, 在当前目录生成 filegirl.yaml 配置文件 初始化 fileboy, 在当前目录生成 filegirl.yaml 配置文件
exec exec
尝试运行定义的 command 命令 尝试运行定义的 command 命令
version
查看当前版本号
` `
var englishSay = []string{ var englishSay = []string{