Skip to content

A Go subcommand extender that adds -ldflags -X variables to go build and go install.

License

Notifications You must be signed in to change notification settings

gomatic/go-vbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-vbuild

A Go subcommand extender that adds -ldflags -X variables to go build and go install.

reportcard build godoc License: GPL v3

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)

Example

See cmds/go-versioning

Installation

⚠️ This installs ${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

About

A Go subcommand extender that adds -ldflags -X variables to go build and go install.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages