build

package module
v0.0.0-...-dec1336 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2017 License: GPL-3.0 Imports: 10 Imported by: 5

README

go-vbuild

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

reportcard build godoc

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = versioning{Major: major, Minor: minor, Patch: patch, Who: who, Where: where}

Functions

func Delegate

func Delegate(subcommand string)

func Flags

func Flags() (args []string, err error)

func MustFlags

func MustFlags() string

Types

This section is empty.

Directories

Path Synopsis
cmds

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL