#!/bin/bash VERSION=$(git describe --tags --abbrev=0) BUILD=$(git rev-parse --short HEAD) PROJ=gterm DIST=dist LDFLAGS="-ldflags \"-X main.Version=${VERSION} -X main.Build=${BUILD} -w -s\"" BIN_FILENAME="${PROJ}" CMD="CGO_ENABLED=0 go build ${LDFLAGS} -o ${DIST}/${BIN_FILENAME} cmd/gterm/main.go" echo "${CMD}" eval $CMD