github.com/jasonkeene/cli@v6.14.1-0.20160816203908-ca5715166dfb+incompatible/ci/cli/tasks/build-binaries.yml (about) 1 platform: linux 2 image: docker:///cloudfoundry/cli-ci 3 4 inputs: 5 - name: cli 6 path: gopath/src/github.com/cloudfoundry/cli 7 8 outputs: 9 - name: cross-compiled 10 - name: windows-signing 11 12 run: 13 path: bash 14 args: 15 - -c 16 - | 17 set -ex 18 19 cwd=$PWD 20 21 export GOPATH=$PWD/gopath 22 export PATH=$GOPATH/bin:$PATH 23 24 go version 25 26 pushd $GOPATH/src/github.com/cloudfoundry/cli 27 bin/replace-sha 28 29 echo "Building 32-bit Linux" 30 CGO_ENABLED=0 GOARCH=386 GOOS=linux go build -a -tags netgo -installsuffix netgo -ldflags '-extldflags "-static"' -o out/cf-cli_linux_i686 . 31 32 echo "Building 32-bit Windows" 33 GOARCH=386 GOOS=windows go build -o out/cf-cli_win32.exe . 34 35 echo "Building 64-bit Linux" 36 CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -a -tags netgo -installsuffix netgo -ldflags '-extldflags "-static"' -o out/cf-cli_linux_x86-64 . 37 38 echo "Building 64-bit Windows" 39 GOARCH=amd64 GOOS=windows go build -o out/cf-cli_winx64.exe . 40 41 mv out/cf-cli_win* $cwd/windows-signing 42 43 echo "Creating tarball" 44 tar -cvzf $cwd/cross-compiled/cf-cli-binaries.tgz -C out . 45 popd