1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 06:19:41 +02:00
portainer/build/build_binary_azuredevops.sh

16 lines
396 B
Bash
Raw Normal View History

export GOPATH="/tmp/go"
binary="portainer"
mkdir -p dist
mkdir -p ${GOPATH}/src/github.com/portainer/portainer
cp -R api ${GOPATH}/src/github.com/portainer/portainer/api
cd 'api/cmd/portainer'
go get -t -d -v ./...
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags '-s'
mv "$BUILD_SOURCESDIRECTORY/api/cmd/portainer/$binary" "$BUILD_SOURCESDIRECTORY/dist/portainer"