gtb

command module
v0.0.0-...-36a10ca Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

Go tool build

gtb (Go tool build) builds Go tools, e.g. goimports, golangci-lint, etc.

Originally I did this using a shell script, but over time the number of variations and cases that need to be considered have grown quite large. The structure of the program reflects this origin: this is more or less a shell script translated into Go.

The configuration file lists all tools that should be built. See the example file tools.yaml. The only required information is the Go path of the corresponding tool. Optionally, a Git repository can be cloned and build instructions can be added, e.g. in order to build k3d this is enough:

github.com/rancher/k3d: clone: true build: - make build BINDIR=${OUTDIR}

OUTDIR is a variable that is expanded to the name of the output directory.

A complete example:

tools:
  github.com/golangci/golangci-lint/cmd/golangci-lint:
  github.com/hairyhenderson/gomplate/v3/cmd/gomplate:
  github.com/rancher/k3d:
    clone: true
    build:
     - make build BINDIR=${OUTDIR}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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