gterm/build.sh

14 lines
325 B
Bash
Raw Normal View History

2021-11-18 03:10:35 +00:00
#!/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