From e01b5565a2bf6b4fe22f9d188785ca2cd9847b14 Mon Sep 17 00:00:00 2001 From: "Mads H. Danquah" Date: Sun, 30 Apr 2023 13:26:27 +0200 Subject: [PATCH] docs: describe how to use the silent flag for dependencies (#680) --- docs/docs/api_reference.md | 1 + docs/docs/usage.md | 6 ++++-- docs/static/schema.json | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/docs/api_reference.md b/docs/docs/api_reference.md index c0128848..4f44b065 100644 --- a/docs/docs/api_reference.md +++ b/docs/docs/api_reference.md @@ -280,6 +280,7 @@ tasks: | --------- | ---------------------------------- | ------- | -------------------------------------------------------- | | `task` | `string` | | The task to be execute as a dependency. | | `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to this task. | +| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. | :::tip diff --git a/docs/docs/usage.md b/docs/docs/usage.md index 0b3353f1..27936a22 100644 --- a/docs/docs/usage.md +++ b/docs/docs/usage.md @@ -468,6 +468,7 @@ tasks: vars: { TEXT: 'before 1' } - task: echo_sth vars: { TEXT: 'before 2' } + silent: true cmds: - echo "after" @@ -574,8 +575,8 @@ tasks: - echo "Another task" ``` -Overriding variables in the called task is as simple as informing `vars` -attribute: +Using the `vars` and `silent` attributes you can choose to pass variables and +toggle [silent mode](#silent-mode) on a call-by-call basis: ```yaml version: '3' @@ -591,6 +592,7 @@ tasks: cmds: - task: greet vars: { RECIPIENT: 'Cruel World' } + silent: true ``` The above syntax is also supported in `deps`. diff --git a/docs/static/schema.json b/docs/static/schema.json index 0ac75eb2..0c9c0f4e 100644 --- a/docs/static/schema.json +++ b/docs/static/schema.json @@ -241,6 +241,10 @@ "vars": { "description": "Values passed to the task called", "$ref": "#/definitions/3/vars" + }, + "silent": { + "description": "Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`.", + "type": "boolean" } } },