mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
Possibility to call another task
This commit is contained in:
22
README.md
22
README.md
@@ -141,6 +141,28 @@ task2:
|
||||
|
||||
Will stop at the moment the dependencies of `task2` are executed.
|
||||
|
||||
### Calling a task from another task
|
||||
|
||||
When a task has many dependencies, they are executed concurrently. This will
|
||||
often result in a faster build pipeline. But in some situations you may need
|
||||
to call other tasks serially. For this just prefix a command with `^`:
|
||||
|
||||
```yml
|
||||
a-task:
|
||||
cmds:
|
||||
- ^another-task
|
||||
- ^even-another-task
|
||||
- echo "Both done"
|
||||
|
||||
another-task:
|
||||
cmds:
|
||||
- ...
|
||||
|
||||
even-another-task:
|
||||
cmds:
|
||||
- ...
|
||||
```
|
||||
|
||||
### Prevent task from running when not necessary
|
||||
|
||||
If a task generates something, you can inform Task the source and generated
|
||||
|
Reference in New Issue
Block a user