git describe for version string
All checks were successful
the build was successful

This commit is contained in:
Sebastian Frank 2019-02-18 13:10:41 +01:00
parent 2bb892175a
commit f2086db921
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3

View File

@ -1,3 +1,3 @@
#!/bin/sh
CGO_ENABLED=1 go build -ldflags "-X main.Version=1.2.3 -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
CGO_ENABLED=1 go build -ldflags "-X main.Version=`git describe --tags --long` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"