updated ci-build.sh
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Paul 2020-05-09 19:47:48 +02:00
parent 97b708515e
commit 07266754a0

View File

@ -21,21 +21,24 @@ build() {
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH} RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
fi fi
go get github.com/gobuffalo/packr/v2/packr2 echo "Running packr2"
if [[ -f ${GOPATH}/bin/packr2 ]] if [[ -f ${GOPATH}/bin/packr2 ]]
then then
${GOPATH}/bin/packr2 ${GOPATH}/bin/packr2
else else
echo "packr2 binary not found"
exit 1 exit 1
fi fi
echo "Building project"
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES} go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
if [[ ! -z $DRONE_TAG ]] if [[ ! -z $DRONE_TAG ]]
then then
tar -czvf ${RELEASENAME}.tar.gz ${PROJECTNAME} tar -czvf ${RELEASENAME}.tar.gz ${PROJECTNAME}
fi fi
echo "Removing binary file"
rm ${PROJECTNAME} rm ${PROJECTNAME}
} }