mirror of
https://github.com/go-task/task.git
synced 2025-02-13 13:59:32 +02:00
Cleaning up the run code
This commit is contained in:
parent
bbe1d8b52e
commit
2da38a5bdc
@ -456,12 +456,16 @@ tasks:
|
||||
### Limiting when tasks run
|
||||
|
||||
If a task executed by multiple `cmds` or multiple `deps` you can limit
|
||||
how many times it is executed each invocation of the `task` command using `run`. `run` can also be set at the root of the taskfile to change the behavior of all the tasks unless explicitly overridden
|
||||
how many times it is executed using `run`. `run` can also be set at the root
|
||||
of the Taskfile to change the behavior of all the tasks unless explicitly
|
||||
overridden
|
||||
|
||||
Supported values for `run`
|
||||
* `always` (default) always attempt to invoke the task regardless of the number of previous executions
|
||||
* `once` only invoke this task once regardless of the number of times referred to
|
||||
* `when_changed` only invokes the task once for a set of variables passed into the task
|
||||
* `always` (default) always attempt to invoke the task regardless of the
|
||||
number of previous executions
|
||||
* `once` only invoke this task once regardless of the number of references
|
||||
* `when_changed` only invokes the task once for each unique set of variables
|
||||
passed into the task
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
@ -3,8 +3,9 @@ package hash
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
"github.com/mitchellh/hashstructure/v2"
|
||||
|
||||
"github.com/go-task/task/v3/taskfile"
|
||||
)
|
||||
|
||||
type HashFunc func(*taskfile.Task) (string, error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user