updated ci files
This commit is contained in:
parent
b52f93d7d6
commit
90bf13586d
@ -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
|
||||
|
15
ci-build.sh
15
ci-build.sh
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user