updated ci files
This commit is contained in:
parent
b52f93d7d6
commit
90bf13586d
@ -17,8 +17,7 @@ steps:
|
|||||||
base_url: https://git.paulbsd.com
|
base_url: https://git.paulbsd.com
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
files: dist/*.tar.gz
|
files: "*.tar.gz"
|
||||||
title: $DRONE_TAG
|
|
||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
- sha512
|
- sha512
|
||||||
@ -44,8 +43,7 @@ steps:
|
|||||||
base_url: https://git.paulbsd.com
|
base_url: https://git.paulbsd.com
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
files: dist/*.tar.gz
|
files: "*.tar.gz"
|
||||||
title: $DRONE_TAG
|
|
||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
- sha512
|
- sha512
|
||||||
@ -71,8 +69,7 @@ steps:
|
|||||||
base_url: https://git.paulbsd.com
|
base_url: https://git.paulbsd.com
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
files: dist/*.tar.gz
|
files: "*.tar.gz"
|
||||||
title: $DRONE_TAG
|
|
||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
- sha512
|
- sha512
|
||||||
|
15
ci-build.sh
15
ci-build.sh
@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
RELEASEDIR=dist
|
PROJECTNAME=qrz
|
||||||
RELEASENAME=qrz
|
RELEASENAME=${PROJECTNAME}
|
||||||
VERSION="0"
|
VERSION="0"
|
||||||
|
|
||||||
GOOPTIONS="-mod=vendor -ldflags='-s -w'"
|
GOOPTIONS="-mod=vendor"
|
||||||
SRCFILES=cmd/qrz/*.go
|
SRCFILES=cmd/qrz/*.go
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
@ -16,18 +16,13 @@ build() {
|
|||||||
VERSION=$DRONE_COMMIT
|
VERSION=$DRONE_COMMIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d $RELEASEDIR ]]
|
|
||||||
then
|
|
||||||
mkdir dist
|
|
||||||
fi
|
|
||||||
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
|
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
|
||||||
then
|
then
|
||||||
RELEASENAME=qrz-${VERSION}-${GOOS}-${GOARCH}
|
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
|
||||||
fi
|
fi
|
||||||
go build -o ${RELEASEDIR}/${RELEASENAME} ${GOOPTIONS} ${SRCFILES}
|
go build -o ${RELEASENAME} ${GOOPTIONS} ${SRCFILES}
|
||||||
if [[ ! -z $DRONE_TAG ]]
|
if [[ ! -z $DRONE_TAG ]]
|
||||||
then
|
then
|
||||||
cd ${RELEASEDIR}
|
|
||||||
tar -czvf ${RELEASENAME}.tar.gz ${RELEASENAME}
|
tar -czvf ${RELEASENAME}.tar.gz ${RELEASENAME}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user