Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benchkram/bob
Bob is a high-level build tool for multi-language projects.
https://github.com/benchkram/bob
build build-system build-tool cicd go golang monorepo nix
Last synced: 2 months ago
JSON representation
Bob is a high-level build tool for multi-language projects.
- Host: GitHub
- URL: https://github.com/benchkram/bob
- Owner: benchkram
- License: apache-2.0
- Created: 2021-12-08T21:21:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T07:28:29.000Z (8 months ago)
- Last Synced: 2024-09-28T09:03:19.150Z (3 months ago)
- Topics: build, build-system, build-tool, cicd, go, golang, monorepo, nix
- Language: Go
- Homepage: https://bob.build
- Size: 2.22 MB
- Stars: 455
- Watchers: 4
- Forks: 14
- Open Issues: 71
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - benchkram/bob - Bob is a high-level build tool for multi-language projects. (Go)
README
Write Once, Build Once, Anywhere---
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?
- You want a pipeline which runs locally and on CI.
- You want remote caching and never having to do the same build twice.
- You want to get rid of "Works on My Machine".
- You like Bazel and its features but think it's too complex.
- You want a build system which keeps frontend tooling functional.# Getting Started
[Docs](https://bob.build/docs/) | [Install](https://bob.build/docs/getting-started/installation/)
## Installing From Source
If you want to go wild, and have Go 1.17 or later installed, the short version is:
```bash
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`.
# How it works
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:
- **input**: Whenever an input changes, the task's commands need to be re-executed.
- **cmd**: Commands to be executed
- **target**: Files, directories or docker images created during execution of _cmd_
- **dependencies** Dependencies managed by the Nix package managerExample of a `bob.yaml` file:
```yaml
nixpkgs: https://github.com/NixOS/nixpkgs/archive/nixos-23.11.tar.gz
build:
build:
input: "*"
cmd: go build -o ./app
target: ./app
dependencies: [go]
```Multiline `sh` and `bash` commands are entirely possible, powered by [mvdan/sh](https://github.com/mvdan/sh).
# Comparisons
- [Dagger vs. bob](https://medium.com/benchkram/dagger-vs-bob-2e917cd185d3)
- [Bazel vs. bob](https://bob.build/blog/vs-bazel)
- [Mage vs. bob](https://medium.com/benchkram/build-system-comparison-mage-vs-bob-aaf4665e3d5c)