From a0761de1847e29a173d3117ddb1551d6f3792683 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 8 Apr 2020 00:19:43 +0200 Subject: [PATCH] updated ci-build.sh --- ci-build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index baec7c1..28506c8 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -5,16 +5,16 @@ VERSION="" if [[ ! -z $DRONE_TAG ]] then VERSION=$DRONE_TAG -elif +else VERSION=$DRONE_COMMIT fi -if [[ ! -z $DRONE_TAG && ! -z $GOOS && ! -z $GOARCH ]] +if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]] then mkdir dist - go build -o dist/qrz-${DRONE_TAG}-${GOOS}-${GOARCH} -mod=vendor -ldflags='-s -w' cmd/qrz/*.go + go build -o dist/qrz-${VERSION}-${GOOS}-${GOARCH} -mod=vendor -ldflags='-s -w' cmd/qrz/*.go cd dist - tar -czvf qrz-${DRONE_TAG}-${GOOS}-${GOARCH}.tar.gz qrz-${DRONE_TAG}-${GOOS}-${GOARCH} + tar -czvf qrz-${VERSION}-${GOOS}-${GOARCH}.tar.gz qrz-${VERSION}-${GOOS}-${GOARCH} else echo "Required variables not set" fi