1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

docs: mention that method key is allowed at root level (#2233)

This commit is contained in:
Valentin Maerten
2025-05-03 17:17:11 +02:00
committed by GitHub
parent 55d1aa260d
commit 84f02a822f

View File

@@ -781,7 +781,10 @@ tasks:
If you prefer these check to be made by the modification timestamp of the files,
instead of its checksum (content), just set the `method` property to
`timestamp`.
`timestamp`. This can be done at two levels:
At the task level for a specific task:
```yaml
version: '3'
@@ -797,6 +800,24 @@ tasks:
method: timestamp
```
At the root level of the Taskfile to apply it globally to all tasks:
```yaml
version: '3'
method: timestamp # Will be the default for all tasks
tasks:
build:
cmds:
- go build .
sources:
- ./*.go
generates:
- app{{exeExt}}
```
In situations where you need more flexibility the `status` keyword can be used.
You can even combine the two. See the documentation for
[status](#using-programmatic-checks-to-indicate-a-task-is-up-to-date) for an