updated ci files
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2020-04-12 16:35:17 +02:00
parent b52f93d7d6
commit 90bf13586d
2 changed files with 8 additions and 16 deletions

View File

@ -17,8 +17,7 @@ steps:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: dist/*.tar.gz
title: $DRONE_TAG
files: "*.tar.gz"
checksum:
- sha256
- sha512
@ -44,8 +43,7 @@ steps:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: dist/*.tar.gz
title: $DRONE_TAG
files: "*.tar.gz"
checksum:
- sha256
- sha512
@ -71,8 +69,7 @@ steps:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: dist/*.tar.gz
title: $DRONE_TAG
files: "*.tar.gz"
checksum:
- sha256
- sha512

View File

@ -1,10 +1,10 @@
#!/bin/bash
RELEASEDIR=dist
RELEASENAME=qrz
PROJECTNAME=qrz
RELEASENAME=${PROJECTNAME}
VERSION="0"
GOOPTIONS="-mod=vendor -ldflags='-s -w'"
GOOPTIONS="-mod=vendor"
SRCFILES=cmd/qrz/*.go
build() {
@ -16,18 +16,13 @@ build() {
VERSION=$DRONE_COMMIT
fi
if [[ ! -d $RELEASEDIR ]]
then
mkdir dist
fi
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
then
RELEASENAME=qrz-${VERSION}-${GOOS}-${GOARCH}
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
fi
go build -o ${RELEASEDIR}/${RELEASENAME} ${GOOPTIONS} ${SRCFILES}
go build -o ${RELEASENAME} ${GOOPTIONS} ${SRCFILES}
if [[ ! -z $DRONE_TAG ]]
then
cd ${RELEASEDIR}
tar -czvf ${RELEASENAME}.tar.gz ${RELEASENAME}
fi
}