Skip to content

liserjrqlxue/version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

add $(git describe --tag --dirty) to build

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages