This commit is contained in:
parent
97b708515e
commit
07266754a0
@ -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}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user