harness-drone/scripts/build.sh
2019-08-06 23:08:32 -07:00

13 lines
464 B
Bash

#!/bin/sh
echo "building docker images for ${GOOS}/${GOARCH} ..."
REPO="github.com/drone/drone"
# compile the server using the cgo
go build -ldflags "-extldflags \"-static\"" -o release/linux/${GOARCH}/drone-server ${REPO}/cmd/drone-server
# compile the runners with gcc disabled
export CGO_ENABLED=0
go build -o release/linux/${GOARCH}/drone-agent ${REPO}/cmd/drone-agent
go build -o release/linux/${GOARCH}/drone-controller ${REPO}/cmd/drone-controller