updated ci-build.sh
This commit is contained in:
parent
00a4431303
commit
a0761de184
@ -5,16 +5,16 @@ VERSION=""
|
|||||||
if [[ ! -z $DRONE_TAG ]]
|
if [[ ! -z $DRONE_TAG ]]
|
||||||
then
|
then
|
||||||
VERSION=$DRONE_TAG
|
VERSION=$DRONE_TAG
|
||||||
elif
|
else
|
||||||
VERSION=$DRONE_COMMIT
|
VERSION=$DRONE_COMMIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z $DRONE_TAG && ! -z $GOOS && ! -z $GOARCH ]]
|
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
|
||||||
then
|
then
|
||||||
mkdir dist
|
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
|
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
|
else
|
||||||
echo "Required variables not set"
|
echo "Required variables not set"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user