This updates the build package to show the go1.18 embedded VCS build info, when compiling with a go 1.18+ version. This was largely ported from https://github.com/decred/dcrd/pull/2841
Example command results:
$ go build ./cmd/dcrlnd && ./dcrlnd --version
dcrlnd version 0.3.3-pre (Go version go1.17 linux/amd64)
$ gotip build ./cmd/dcrlnd && ./dcrlnd --version
dcrlnd version 0.3.3-pre+b3ce328ab.dirty (Go version devel go1.18-9d0ca262b Wed Dec 15 00:33:55 2021 +0000 linux/amd64)
$ gotip build -buildvcs=false ./cmd/dcrlnd && ./dcrlnd --version
dcrlnd version 0.3.3-pre (Go version devel go1.18-9d0ca262b Wed Dec 15 00:33:55 2021 +0000 linux/amd64)
Rebased on top of #151
This updates the build package to show the go1.18 embedded VCS build info, when compiling with a go 1.18+ version. This was largely ported from https://github.com/decred/dcrd/pull/2841
Example command results: