compile cred-alert with short git sha version
[finishes
@@ -5,6 +5,8 @@ set -e -u
export GOPATH="${PWD}/cred-alert"
export PATH="${GOPATH}/bin:${PATH}"
+version=$(git --git-dir=${GOPATH}/.git rev-parse --short HEAD)
+
OUTPUT="${PWD}/cred-alert-cli-${OS}"
-go build -x -v -o "${OUTPUT}/cred-alert-cli_${OS}" "cred-alert/cmd/cred-alert-cli"
+go build -ldflags "-X cred-alert/commands.version=${version}" -x -v -o "${OUTPUT}/cred-alert-cli_${OS}" "cred-alert/cmd/cred-alert-cli"
