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

This commit is contained in:
Paul Lecuq 2022-02-11 09:47:36 +01:00
parent 7d36b8e6fe
commit ac71103475
2 changed files with 2 additions and 3 deletions

View File

@ -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} ]]

View File

@ -1,6 +1,5 @@
#!/bin/bash
VERSION=$(git tag | tail -n 1)
echo 'package main
var version = "'${VERSION}'"' > version.go