github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+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  BUILD_VERSION=$(cat ci/VERSION)
    10  BUILD_SHA=$(git rev-parse --short HEAD)
    11  BUILD_DATE=$(date -u +"%Y-%m-%d")
    12  
    13  go build \
    14    -o $ROOT_DIR/out/cf \
    15    -ldflags "-w \
    16              -s \
    17              -X code.cloudfoundry.org/cli/version.binaryVersion=${BUILD_VERSION} \
    18              -X code.cloudfoundry.org/cli/version.binarySHA=${BUILD_SHA} \
    19              -X code.cloudfoundry.org/cli/version.binaryBuildDate=${BUILD_DATE}" \
    20    .