gravel

module
v0.0.0-...-2c887f5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: BSD-3-Clause

README

gravel

Gravel is a build tool for Go monorepos. To speed up builds, gravel caches a hash of the files in a package that have changed since the last build, and only tests/builds the packages that depend on them. Gravel uses Go modules for managing dependencies, which makes it more feasible to use than something like Bazel for small/medium-sized projects.

Installation
$ go install github.com/egoodhall/gravel@latest
Usage
$ gravel build
Embedding Version Information

Binaries built by gravel can have version embedded as shown below:

package example

import (
  "fmt"

  "github.com/egoodhall/gravel/pkg/buildinfo"
)

func PrintBuildInfo() {
  // These values will be set by gravel during the build
  fmt.Println("version:", buildinfo.GetVersion())
  fmt.Println("commit: ", buildinfo.GetCommit())
}
Output

All binaries are placed into $root/gravel/bin.

Directories

Path Synopsis
cmd
internal
cli
pkg

Jump to

Keyboard shortcuts

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