From 84f02a822fa12333890a03f144b31e9f6b6db337 Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Sat, 3 May 2025 17:17:11 +0200 Subject: [PATCH] docs: mention that method key is allowed at root level (#2233) --- website/docs/usage.mdx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/website/docs/usage.mdx b/website/docs/usage.mdx index eda391a0..6fdc1eb1 100644 --- a/website/docs/usage.mdx +++ b/website/docs/usage.mdx @@ -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