From 8779b3ad8b40961a81182cec56528c27692a2cb4 Mon Sep 17 00:00:00 2001 From: ouqiang Date: Wed, 17 May 2017 13:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BA=8C=E8=BF=9B=E5=88=B6?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8E=BB=E6=8E=89=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20bugfix#=E7=94=9F=E6=88=90=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E5=8C=85=E8=84=9A=E6=9C=AC,=20=E5=BD=93=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=A4=B1=E8=B4=A5=E6=97=B6,=20=E6=9C=AA=E5=8F=8A?= =?UTF-8?q?=E6=97=B6=E9=80=80=E5=87=BA=EF=BC=8C=E8=80=8C=E6=98=AF=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E5=BE=80=E4=B8=8B=E6=89=A7=E8=A1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 6 +++--- upload_package_to_qiniu.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 6474b59..7705a14 100644 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/upload_package_to_qiniu.sh b/upload_package_to_qiniu.sh index f4f4c11..245b05a 100644 --- a/upload_package_to_qiniu.sh +++ b/upload_package_to_qiniu.sh @@ -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