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