1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 12:25:22 +02:00

fix(build-system): fix local build system after appveyor introduction (#2528)

This commit is contained in:
Anthony Lapenna 2018-12-09 16:08:36 +13:00 committed by GitHub
parent 65979709e9
commit 79c24ced96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 106 additions and 51 deletions

14
build/build_binary_appveyor.sh Executable file
View file

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