github.com/itscaro/cli@v0.0.0-20190705081621-c9db0fe93829/scripts/build/binary (about)

     1  #!/usr/bin/env bash
     2  #
     3  # Build a static binary for the host OS/ARCH
     4  #
     5  
     6  set -eu -o pipefail
     7  
     8  source ./scripts/build/.variables
     9  
    10  echo "Building statically linked $TARGET"
    11  export CGO_ENABLED=0
    12  go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
    13  
    14  ln -sf "$(basename "${TARGET}")" build/docker