生成二进制文件,去掉调试信息

bugfix#生成压缩包脚本, 当编译失败时, 未及时退出,而是继续往下执行.
pull/21/merge
ouqiang 2017-05-17 13:34:44 +08:00
parent 28eda835c0
commit 8779b3ad8b
2 changed files with 5 additions and 5 deletions

View File

@ -53,8 +53,8 @@ if [[ $ARCH != '386' && $ARCH != 'amd64' ]];then
fi
echo '开始编译'
GOOS=$OS GOARCH=$ARCH go build
if [[ ! $? ]];then
GOOS=$OS GOARCH=$ARCH go build -ldflags '-w'
if [[ $? != 0 ]];then
exit 1
fi
echo '编译完成'
@ -68,7 +68,7 @@ else
fi
mkdir -p $TEMP_DIR/$APP_NAME
if [[ ! $? ]]; then
if [[ $? != 0 ]]; then
exit 1
fi

View File

@ -11,7 +11,7 @@ fi
for i in linux darwin windows
do
./build.sh -p $i
if [[ ! $? ]];then
if [[ $? != 0 ]];then
break
fi
done
@ -25,7 +25,7 @@ do
# 上传文件 qrsctl put bucket key srcFile
KEY=gocron/$i
qrsctl put github $KEY $i
if [[ ! $? ]];then
if [[ $? != 0 ]];then
break
fi
echo "刷新七牛CDN-" $QINIU_URL/$KEY