github.com/rancher/types@v0.0.0-20220328215343-4370ff10ecd5/scripts/build (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  source $(dirname $0)/version
     5  
     6  cd $(dirname $0)/..
     7  
     8  mkdir -p bin
     9  [ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"
    10  CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/types