Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 761 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 761 Bytes

version

GoDoc Go Report Card

After assign version info when go build, log out version info when run

gitDescribe=$(git branch --show-current):$(git describe --tags --dirty)
golangVersion=$(go version)
buildStamp=$(date '+%Y-%m-%d_%I:%M:%S%p')
go build -ldflags "-X 'github.com/liserjrqlxue/version.gitDescribe=$gitDescribe' -X 'github.com/liserjrqlxue/version.buildStamp=$buildStamp -X 'github.com/liserjrqlxue/version.golangVersion=$golangVersion'"

vb

vb do the go build commands above