github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/ci/cli/tasks/build-binaries.yml (about) 1 platform: linux 2 3 image_resource: 4 type: docker-image 5 source: 6 repository: cfcli/cli-base 7 8 inputs: 9 - name: cli-ci 10 - name: cli 11 path: gopath/src/code.cloudfoundry.org/cli 12 - name: i18n-data 13 14 outputs: 15 - name: linux-compiled 16 17 run: 18 path: bash 19 args: 20 - -c 21 - | 22 set -ex 23 24 cwd=$PWD 25 26 export GOPATH=$PWD/gopath 27 export PATH=$GOPATH/bin:$PATH 28 export TARGET_GO_VERSION=${TARGET_GO_VERSION:-"UNSET"} 29 export GODEBUG="tls13=0" 30 31 if go version | grep -v "\b$TARGET_GO_VERSION\b"; then 32 echo "ERROR: expected target go version [ $TARGET_GO_VERSION ]" 33 exit 1 34 fi 35 36 go version 37 38 mv i18n-data/i18n_resources.go $GOPATH/src/code.cloudfoundry.org/cli/i18n/resources 39 40 pushd $GOPATH/src/code.cloudfoundry.org/cli 41 export CF_BUILD_VERSION=$(cat BUILD_VERSION) 42 export CF_BUILD_SHA=$(git rev-parse --short HEAD) 43 export CF_BUILD_DATE=$(date -u +"%Y-%m-%d") 44 45 echo "Building 32-bit Linux" 46 make out/cf-cli_linux_i686 47 48 echo "Building 64-bit Linux" 49 make out/cf-cli_linux_x86-64 50 51 echo "Building 32-bit Windows" 52 make out/cf-cli_win32.exe 53 54 echo "Building 64-bit Windows" 55 make out/cf-cli_winx64.exe 56 57 echo "Creating tarball" 58 tar -cvzf $cwd/linux-compiled/cf-cli-binaries.tgz -C out . 59 popd