Skip to main content
Version: 0.4.1

Run

info

A tasks defined under the run: directive is refered to as run task

The run: directive let's you define local development environments consisting of one or multiple binaries and compose files.

build:
build:
inputs: |-
main1.go
cmd: |-
go build -o app
target: app

run:
app:
path: app
dependsOn:
- build

A run tasks can be started using bob run taskname. In this case it's

bob run app

This will launch a terminal ui similar to this.

bob git status
  • TAB switch between logs and status
  • ESC follow output
  • ctrl-r rebuild if necessary and restart.
  • ctrl-s switch between scrolling and copy text mode.
  • ctrl+c shutdown.

Types

By default a run task assumes a binary to be executed. Though, it also accepts a compose file as input.

run:
run:
type: compose

This will search for a docker-compose.yaml in the same dir as your bob.yaml is located.

The path keyword can be used to point to the correct location of the compose file

run:
run:
type: compose
path: dir/docker-compose.yaml

Combine Run- and Build-Tasks

Tasks can depend on other run tasks. This is useful if your binarys require run time dependecies like databases defined in compose files.

build:
build:
inputs: |-
main1.go
cmd: |-
go build -o app
target: app

run:
app:
path: app
dependsOn:
- build
- database
database:
type: compose

Bob takes care of building, starting and shutting down everything together. No more scripts needed to run a local development environment.