mirror of https://github.com/ouqiang/gocron
生成windows二进制文件, 隐藏窗口, 后台运行
parent
4a77958556
commit
519c6613c7
7
build.sh
7
build.sh
|
@ -53,7 +53,12 @@ if [[ $ARCH != '386' && $ARCH != 'amd64' ]];then
|
|||
fi
|
||||
|
||||
echo '开始编译'
|
||||
GOOS=$OS GOARCH=$ARCH go build -ldflags '-w'
|
||||
if [[ $OS = 'windows' ]];then
|
||||
GOOS=$OS GOARCH=$ARCH go build -ldflags '-w -H windowsgui'
|
||||
else
|
||||
GOOS=$OS GOARCH=$ARCH go build -ldflags '-w'
|
||||
fi
|
||||
|
||||
if [[ $? != 0 ]];then
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue