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

View File

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