qrz/ci-build.sh
Paul Lecuq 0d20b2f019
All checks were successful
continuous-integration/drone/push Build is passing
updated ci-build.sh
2020-04-07 23:47:40 +02:00

16 lines
366 B
Bash
Executable File

#!/bin/bash
echo $DRONE_TAG
echo $GOOS
echo $GOARCH
if [[ ! -z $DRONE_TAG && ! -z $GOOS && ! -z $GOARCH ]]
then
mkdir dist
go build -o dist/qrz-${DRONE_TAG}-${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}
else
echo "Required variables not set"
fi