github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+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 30 if go version | grep -v "\b$TARGET_GO_VERSION\b"; then 31 echo "ERROR: expected target go version [ $TARGET_GO_VERSION ]" 32 exit 1 33 fi 34 35 go version 36 37 mv i18n-data/i18n_resources.go $GOPATH/src/code.cloudfoundry.org/cli/i18n/resources 38 39 pushd $GOPATH/src/code.cloudfoundry.org/cli 40 export CF_BUILD_VERSION=$(cat BUILD_VERSION) 41 export CF_BUILD_SHA=$(git rev-parse --short HEAD) 42 export CF_BUILD_DATE=$(date -u +"%Y-%m-%d") 43 44 echo "Building 32-bit Linux" 45 make out/cf-cli_linux_i686 46 47 echo "Building 64-bit Linux" 48 make out/cf-cli_linux_x86-64 49 50 echo "Building 32-bit Windows" 51 make out/cf-cli_win32.exe 52 53 echo "Building 64-bit Windows" 54 make out/cf-cli_winx64.exe 55 56 echo "Creating tarball" 57 tar -cvzf $cwd/linux-compiled/cf-cli-binaries.tgz -C out . 58 popd