A Go subcommand extender that adds -ldflags -X
variables to
go build
and go install
.
It runs:
go (build|install) [args...] -ldflags \
-X github.com/gomatic/go-vbuild.Who=${USER} \
-X github.com/gomatic/go-vbuild.Where=${HOST} \
-X github.com/gomatic/go-vbuild.Patch=$(git show -s --format=%ct)-$(git log --pretty=format:'%h' -n 1)
${GOBIN}/go-build
, ${GOBIN}/go-install
. These are intended to be
executed by extender to override the
go build
and go install
commands.
go get github.com/gomatic/go-vbuild