From 70145c150449859009ed747d3fc64cceda2ff764 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 13 Nov 2021 11:51:23 +0100 Subject: [PATCH] update ci-build.sh --- ci-build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index f685b23..9e75727 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -11,18 +11,18 @@ SRCFILES=cmd/${PROJECTNAME}/*.go build() { echo "Begin of build" - if [[ ! -z $DRONE_TAG ]] + if [[ ! -z ${DRONE_TAG} ]] then echo "Drone tag set, let's do a release" - VERSION=$DRONE_TAG + VERSION=${DRONE_TAG} echo "${PROJECTNAME} ${VERSION}" > /build/VERSION - elif [[ ! -z $DRONE_TAG ]] + elif [[ ! -z ${DRONE_TAG} ]] then echo "Drone not set, let's only do a build" - VERSION=$DRONE_COMMIT + VERSION=${DRONE_COMMIT} fi - if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]] + if [[ ! -z ${VERSION} && ! -z ${GOOS} && ! -z ${GOARCH} ]] then echo "Let's set a release name" RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH} @@ -32,7 +32,7 @@ build() { go generate ${SRCFILES} go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES} - if [[ ! -z $DRONE_TAG ]] + if [[ ! -z ${DRONE_TAG} ]] then echo "Let's make archives" mkdir -p /build @@ -46,10 +46,10 @@ build() { } clean() { - rm -rf $RELEASEDIR + rm -rf ${RELEASEDIR} for i in ${PROJECTNAME} "cmd/${PROJECTNAME}/packrd" "cmd/${PROJECTNAME}/main-packr.go" do - rm -rf $i + rm -rf ${i} done }