Get version information from git tag
This commit is contained in:
parent
19635d98e4
commit
d103269a62
2 changed files with 4 additions and 3 deletions
|
@ -5,4 +5,5 @@ set -eu
|
||||||
cd "$(dirname "${0}")/.."
|
cd "$(dirname "${0}")/.."
|
||||||
|
|
||||||
echo '-X "github.com/abcum/surreal/util/build.rev='$(git rev-parse HEAD)'"' \
|
echo '-X "github.com/abcum/surreal/util/build.rev='$(git rev-parse HEAD)'"' \
|
||||||
|
'-X "github.com/abcum/surreal/util/build.ver='$(git describe --tags --abbrev=0 || echo 0.0.0)'"' \
|
||||||
'-X "github.com/abcum/surreal/util/build.time='$(date -u '+%Y/%m/%d %H:%M:%S')'"'
|
'-X "github.com/abcum/surreal/util/build.time='$(date -u '+%Y/%m/%d %H:%M:%S')'"'
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ver = "0.1.0" // Version number
|
ver string // Version number
|
||||||
rev string // Git revision of this build
|
rev string // Git revision of this build
|
||||||
time string // Build time in UTC (year/month/day hour:min:sec)
|
time string // Build time in UTC (year/month/day hour:min:sec)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue