github.com/xiaobinqt/libcompose@v1.1.0/hack/binary (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  # Get rid of existing binary
     5  rm -f libcompose-cli
     6  
     7  go generate
     8  
     9  BUILDTIME=$(date --rfc-3339 ns | sed -e 's/ /T/') &> /dev/null
    10  GITCOMMIT=$(git rev-parse --short HEAD)
    11  
    12  # Build binaries
    13  go build \
    14     -ldflags="-w -X github.com/xiaobinqt/libcompose/version.GITCOMMIT=${GITCOMMIT} -X github.com/xiaobinqt/libcompose/version.BUILDTIME=${BUILDTIME} -X github.com/xiaobinqt/libcompose/version.SHOWWARNING=${SHOWWARNING}" \
    15     -o bundles/libcompose-cli \
    16     ./cli/main