github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/bin/build (about) 1 #!/bin/bash 2 3 set -e 4 5 echo -e "\nGenerating Binary..." 6 7 ROOT_DIR=$(cd $(dirname $(dirname $0)) && pwd) 8 9 if [[ $(git status --porcelain cf/i18n/resources) ]]; then 10 $ROOT_DIR/bin/generate-language-resources 11 fi 12 13 BUILD_VERSION=$(cat ci/VERSION) 14 BUILD_SHA=$(git rev-parse --short HEAD) 15 BUILD_DATE=$(date -u +"%Y-%m-%d") 16 17 go build \ 18 -o $ROOT_DIR/out/cf \ 19 -ldflags "-w \ 20 -s \ 21 -X code.cloudfoundry.org/cli/version.binaryVersion=${BUILD_VERSION} \ 22 -X code.cloudfoundry.org/cli/version.binarySHA=${BUILD_SHA} \ 23 -X code.cloudfoundry.org/cli/version.binaryBuildDate=${BUILD_DATE}" \ 24 .