github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/ci/cli-v7/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 10 path: gopath/src/code.cloudfoundry.org/cli 11 - name: i18n-data 12 13 outputs: 14 - name: linux-compiled 15 16 run: 17 path: bash 18 args: 19 - -c 20 - | 21 set -ex 22 23 cwd=$PWD 24 25 export GOPATH=$PWD/gopath 26 export PATH=$GOPATH/bin:$PATH 27 export TARGET_GO_VERSION=${TARGET_GO_VERSION:-"UNSET"} 28 29 if go version | grep -v "\b$TARGET_GO_VERSION\b"; then 30 echo "ERROR: expected target go version [ $TARGET_GO_VERSION ]" 31 exit 1 32 fi 33 34 go version 35 36 mv i18n-data/i18n_resources.go $GOPATH/src/code.cloudfoundry.org/cli/i18n/resources 37 38 pushd $GOPATH/src/code.cloudfoundry.org/cli 39 export CF_BUILD_VERSION=$(cat BUILD_VERSION) 40 export CF_BUILD_SHA=$(git rev-parse --short HEAD) 41 export CF_BUILD_DATE=$(date -u +"%Y-%m-%d") 42 43 echo "Building 32-bit Linux" 44 make out/cf7-cli_linux_i686 45 46 echo "Building 64-bit Linux" 47 make out/cf7-cli_linux_x86-64 48 49 echo "Building 32-bit Windows" 50 make out/cf7-cli_win32.exe 51 52 echo "Building 64-bit Windows" 53 make out/cf7-cli_winx64.exe 54 55 echo "Creating tarball" 56 tar -cvzf $cwd/linux-compiled/cf-cli-binaries.tgz -C out . 57 popd