This commit is contained in:
parent
97b708515e
commit
07266754a0
@ -21,21 +21,24 @@ build() {
|
||||
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
|
||||
fi
|
||||
|
||||
go get github.com/gobuffalo/packr/v2/packr2
|
||||
|
||||
echo "Running packr2"
|
||||
if [[ -f ${GOPATH}/bin/packr2 ]]
|
||||
then
|
||||
${GOPATH}/bin/packr2
|
||||
else
|
||||
echo "packr2 binary not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building project"
|
||||
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
||||
|
||||
if [[ ! -z $DRONE_TAG ]]
|
||||
then
|
||||
tar -czvf ${RELEASENAME}.tar.gz ${PROJECTNAME}
|
||||
fi
|
||||
|
||||
echo "Removing binary file"
|
||||
rm ${PROJECTNAME}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user