Skip to content

Commit

Permalink
Merge pull request #31 from tj/compose
Browse files Browse the repository at this point in the history
doc: add compose example
  • Loading branch information
yields authored Aug 31, 2019
2 parents 308b6bb + 3df16c9 commit cf8e644
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,33 @@ stage:
...
```

## Composition

You can compose multiple commands into a single command
by utilizing robo's built-in `robo.file` variable:

```yml
one:
summary: echo one
command: echo one
two:
summary: echo two
command: echo two
all:
summary: echo one two
command: |
robo -c {{ .robo.file }} one
robo -c {{ .robo.file }} two
```

```
$ robo all
one
two
```
## Why?
We generally use Makefiles for project specific tasks, however
Expand Down
14 changes: 14 additions & 0 deletions _examples/compose/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

one:
summary: echo one
command: echo one

two:
summary: echo two
command: echo two

all:
summary: echo one two
command: |
robo -c {{ .robo.file }} one
robo -c {{ .robo.file }} two

0 comments on commit cf8e644

Please sign in to comment.