Write Once, Build Once, Anywhere
<a href="https://github.com/benchkram/bob/releases">
<img src="https://img.shields.io/github/release/benchkram/bob.svg" alt="Latest Release">
</a>
<a href="https://pkg.go.dev/github.com/benchkram/bob?tab=doc">
<img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="GoDoc">
</a>
<a href="https://github.com/benchkram/bob/actions">
<img src="https://github.com/benchkram/bob/actions/workflows/main.yml/badge.svg" alt="Build Status">
</a>
Bob is a high-level build tool for multi-language projects.
Use it to build codebases organized in multiple repositories or in a monorepo.
When to consider using Bob?
If you want to go wild, and have Go 1.17 or later installed, the short version is:
git clone https://github.com/benchkram/bob
cd bob
go install
For shell autocompletion (bash and zsh supported) add source <(bob completion) to your .bashrc/.zshrc.
Bob generates its internal build graph from tasks described in a bob.yaml file (usually referred to as "Bobfile").
Each build step is executed in a sandboxed shell only using the given dependencies required from the nix package manager.
The basic components of a build task are:
Example of a bob.yaml file:
build:
build:
input: "*"
cmd: go build -o ./app
target: ./app
dependencies: [git, go_1_18]
Multiline sh and bash commands are entirely possible, powered by mvdan/sh.