updated ci
This commit is contained in:
parent
7d36b8e6fe
commit
ac71103475
@ -14,12 +14,12 @@ build() {
|
|||||||
if [[ ! -z ${DRONE_TAG} ]]
|
if [[ ! -z ${DRONE_TAG} ]]
|
||||||
then
|
then
|
||||||
echo "Drone tag set, let's do a release"
|
echo "Drone tag set, let's do a release"
|
||||||
VERSION=${DRONE_TAG}
|
export VERSION=${DRONE_TAG}
|
||||||
echo "${PROJECTNAME} ${VERSION}" > /build/VERSION
|
echo "${PROJECTNAME} ${VERSION}" > /build/VERSION
|
||||||
elif [[ ! -z ${DRONE_COMMIT} ]]
|
elif [[ ! -z ${DRONE_COMMIT} ]]
|
||||||
then
|
then
|
||||||
echo "Drone not set, let's only do a build"
|
echo "Drone not set, let's only do a build"
|
||||||
VERSION=${DRONE_COMMIT}
|
export VERSION=${DRONE_COMMIT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z ${VERSION} && ! -z ${GOOS} && ! -z ${GOARCH} ]]
|
if [[ ! -z ${VERSION} && ! -z ${GOOS} && ! -z ${GOARCH} ]]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION=$(git tag | tail -n 1)
|
|
||||||
echo 'package main
|
echo 'package main
|
||||||
|
|
||||||
var version = "'${VERSION}'"' > version.go
|
var version = "'${VERSION}'"' > version.go
|
Loading…
Reference in New Issue
Block a user