mirror of
https://github.com/go-task/task.git
synced 2025-08-08 22:36:57 +02:00
chore: sync translations (#1225)
This commit is contained in:
@ -9,7 +9,7 @@ Some of the work to improve the Task ecosystem is done by the community, be it i
|
||||
|
||||
## Translations
|
||||
|
||||
[@DeronW](https://github.com/DeronW) maintains the [Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the website [on this repository](https://github.com/DeronW/task).
|
||||
We use [Crowdin](https://crowdin.com/project/taskfile) to translate our document.
|
||||
|
||||
## Integrations
|
||||
|
||||
|
@ -15,10 +15,14 @@ In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
1. Using the relevant environment variable in front of a task command. For example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off invocations of Task to test out experimental features.
|
||||
1. Using the relevant environment variable in your "dotfiles" (e.g. `.bashrc`, `.zshrc` etc.). This is intended for permanently enabling experimental features in your environment.
|
||||
1. Creating a `.env` file in the same directory as your root Taskfile that contains the relevant environment variables. e.g.
|
||||
|
||||
Flags will always override environment variables.
|
||||
```shell
|
||||
# .env
|
||||
TASK_X_FEATURE=1
|
||||
```
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
@ -26,11 +30,11 @@ Each section below details an experiment or deprecation and explains what the fl
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
### ![experiment] {Feature} ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Environment variable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
- Breaks: {list any existing functionality that will be broken by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
@ -46,9 +50,21 @@ This notice does not mean that we are immediately removing support for version 2
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment][] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status checks. This can be useful, but we have found that most of the time users only expect the direct task they are calling to be forced and _not_ all of its dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called task. All dependant tasks will have their statuses checked as normal and will only run if Task considers them to be out of date. A new `--force-all` flag will also be added to maintain the current behavior for users that need this functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
|
@ -37,9 +37,13 @@ If you omit a task name, "default" will be assumed.
|
||||
Task will look for the following file names, in order of priority:
|
||||
|
||||
- Taskfile.yml
|
||||
- taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- taskfile.dist.yml
|
||||
- Taskfile.dist.yaml
|
||||
- taskfile.dist.yaml
|
||||
|
||||
The intention of having the `.dist` variants is to allow projects to have one committed version (`.dist`) while still allowing individual users to override the Taskfile by adding an additional `Taskfile.yml` (which would be on `.gitignore`).
|
||||
|
||||
@ -65,7 +69,7 @@ In this example, we can run `cd <service>` and `task up` and as long as the `<se
|
||||
|
||||
### Running a global Taskfile
|
||||
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile on either `$HOME/Taskfile.yml` or `$HOME/Taskfile.yaml` paths.
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile that matches `$HOME/{T,t}askfile.{yml,yaml}` .
|
||||
|
||||
This is useful to have automation that you can run from anywhere in your system!
|
||||
|
||||
|
@ -9,7 +9,7 @@ Certains travaux d'amélioration de l'écosystème Task sont réalisés par la c
|
||||
|
||||
## Traductions
|
||||
|
||||
[@DeronW](https://github.com/DeronW) maintient la [traduction Chinoise](https://task-zh.readthedocs.io/zh_CN/latest/) du site [sur ce dépôt](https://github.com/DeronW/task).
|
||||
We use [Crowdin](https://crowdin.com/project/taskfile) to translate our document.
|
||||
|
||||
## Intégrations
|
||||
|
||||
|
@ -15,10 +15,14 @@ In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
1. Using the relevant environment variable in front of a task command. For example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off invocations of Task to test out experimental features.
|
||||
1. Using the relevant environment variable in your "dotfiles" (e.g. `.bashrc`, `.zshrc` etc.). This is intended for permanently enabling experimental features in your environment.
|
||||
1. Creating a `.env` file in the same directory as your root Taskfile that contains the relevant environment variables. e.g.
|
||||
|
||||
Flags will always override environment variables.
|
||||
```shell
|
||||
# .env
|
||||
TASK_X_FEATURE=1
|
||||
```
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
@ -26,11 +30,11 @@ Each section below details an experiment or deprecation and explains what the fl
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
### ![experiment] {Feature} ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Environment variable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
- Breaks: {list any existing functionality that will be broken by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
@ -46,9 +50,21 @@ This notice does not mean that we are immediately removing support for version 2
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment][] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status checks. This can be useful, but we have found that most of the time users only expect the direct task they are calling to be forced and _not_ all of its dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called task. All dependant tasks will have their statuses checked as normal and will only run if Task considers them to be out of date. A new `--force-all` flag will also be added to maintain the current behavior for users that need this functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
|
@ -37,9 +37,13 @@ If you omit a task name, "default" will be assumed.
|
||||
Task will look for the following file names, in order of priority:
|
||||
|
||||
- Taskfile.yml
|
||||
- taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- taskfile.dist.yml
|
||||
- Taskfile.dist.yaml
|
||||
- taskfile.dist.yaml
|
||||
|
||||
The intention of having the `.dist` variants is to allow projects to have one committed version (`.dist`) while still allowing individual users to override the Taskfile by adding an additional `Taskfile.yml` (which would be on `.gitignore`).
|
||||
|
||||
@ -65,7 +69,7 @@ In this example, we can run `cd <service>` and `task up` and as long as the `<se
|
||||
|
||||
### Running a global Taskfile
|
||||
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile on either `$HOME/Taskfile.yml` or `$HOME/Taskfile.yaml` paths.
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile that matches `$HOME/{T,t}askfile.{yml,yaml}` .
|
||||
|
||||
This is useful to have automation that you can run from anywhere in your system!
|
||||
|
||||
|
@ -7,7 +7,7 @@ toc_max_heading_level: 5
|
||||
|
||||
# Referência da API
|
||||
|
||||
## CLI
|
||||
## Linha de comando
|
||||
|
||||
O comando "task" tem a seguinte sintaxe:
|
||||
|
||||
@ -21,39 +21,39 @@ Se `--` é informado, todos os argumentos remanescentes serão atribuídos a uma
|
||||
|
||||
:::
|
||||
|
||||
| Abreviação | Modificador | Tipo | Predefinição | Descrição |
|
||||
| ---------- | --------------------------- | -------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Saída colorida. Habilitado por padrão. Defina o modificador como `false` ou use `NO_COLOR=1` para desativar. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limitar número de tarefas a serem executadas simultaneamente. Zero significa ilimitado. |
|
||||
| `-d` | `--dir` | `string` | Pasta atual | Define a pasta de execução. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compila e imprime as tarefas na ordem em que elas seriam executadas, sem executá-las. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Faz com que o código de saída do comando sendo executado seja repassado pelo Task. |
|
||||
| `-f` | `--force` | `bool` | `false` | Força a execução mesmo quando a tarefa está atualizada. |
|
||||
| `-g` | `--global` | `bool` | `false` | Executa o Taskfile global, de `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Mostra a ajuda do Task. |
|
||||
| `-i` | `--init` | `bool` | `false` | Cria um novo Taskfile.yml na pasta atual. |
|
||||
| `-I` | `--interval` | `string` | `5s` | Define um intervalo de tempo diferente ao usar `--watch`, o padrão sendo 5 segundos. Este valor deve ser um [Go Duration](https://pkg.go.dev/time#ParseDuration) válido. |
|
||||
| `-l` | `--list` | `bool` | `false` | Lista as tarefas com descrição do Taskfile atual. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lista todas as tarefas, com ou sem descrição. |
|
||||
| | `--sort` | `string` | `default` | Changes the order of the tasks when listed.<br />`default` - Alphanumeric with root tasks first<br />`alphanumeric` - Alphanumeric<br />`none` - No sorting (As they appear in the Taskfile) |
|
||||
| | `--json` | `bool` | `false` | Imprime a saída em [JSON](#json-output). |
|
||||
| `-o` | `--output` | `string` | O padrão é o que está definido no Taskfile, ou então `intervealed`. | Configura o estilo de saída: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Formato de mensagem a imprimir antes da saída agrupada de uma tarefa. |
|
||||
| | `--output-group-end` | `string` | | Formato de mensagem a imprimir depois da saída agrupada de uma tarefa. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Oculta saída dos comandos que terminarem sem erro. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executa as tarefas fornecidas na linha de comando em paralelo. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Desabilita impressão. |
|
||||
| `-y` | `--yes` | `bool` | `false` | Assume "yes" as answer to all prompts. |
|
||||
| | `--status` | `bool` | `false` | Sai com código de saída diferente de zero se alguma das tarefas especificadas não estiver atualizada. |
|
||||
| | `--summary` | `bool` | `false` | Mostrar resumo sobre uma tarefa. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` ou `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Habilita modo verboso. |
|
||||
| | `--version` | `bool` | `false` | Mostrar versão do Task. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Habilita o monitoramento de tarefas. |
|
||||
| Abreviação | Modificador | Tipo | Predefinição | Descrição |
|
||||
| ---------- | --------------------------- | -------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Saída colorida. Habilitado por padrão. Defina o modificador como `false` ou use `NO_COLOR=1` para desativar. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limitar número de tarefas a serem executadas simultaneamente. Zero significa ilimitado. |
|
||||
| `-d` | `--dir` | `string` | Pasta atual | Define a pasta de execução. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compila e imprime as tarefas na ordem em que elas seriam executadas, sem executá-las. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Faz com que o código de saída do comando sendo executado seja repassado pelo Task. |
|
||||
| `-f` | `--force` | `bool` | `false` | Força a execução mesmo quando a tarefa está atualizada. |
|
||||
| `-g` | `--global` | `bool` | `false` | Executa o Taskfile global, de `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Mostra a ajuda do Task. |
|
||||
| `-i` | `--init` | `bool` | `false` | Cria um novo Taskfile.yml na pasta atual. |
|
||||
| `-I` | `--interval` | `string` | `5s` | Define um intervalo de tempo diferente ao usar `--watch`, o padrão sendo 5 segundos. Este valor deve ser um [Go Duration](https://pkg.go.dev/time#ParseDuration) válido. |
|
||||
| `-l` | `--list` | `bool` | `false` | Lista as tarefas com descrição do Taskfile atual. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lista todas as tarefas, com ou sem descrição. |
|
||||
| | `--sort` | `string` | `default` | Muda order das terafas quando listadas.<br />`default` - Ordem alfabética com as tarefas fo Taskfile raíz listadas por primeiro<br />`alphanumeric` - Alfabética<br />`none` - Sem ordenação (mantém a mesma ordem de declaração no Taskfile) |
|
||||
| | `--json` | `bool` | `false` | Imprime a saída em [JSON](#json-output). |
|
||||
| `-o` | `--output` | `string` | O padrão é o que está definido no Taskfile, ou então `intervealed`. | Configura o estilo de saída: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Formato de mensagem a imprimir antes da saída agrupada de uma tarefa. |
|
||||
| | `--output-group-end` | `string` | | Formato de mensagem a imprimir depois da saída agrupada de uma tarefa. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Oculta saída dos comandos que terminarem sem erro. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executa as tarefas fornecidas na linha de comando em paralelo. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Desabilita impressão. |
|
||||
| `-y` | `--yes` | `bool` | `false` | Assuma "sim" como resposta a todos os prompts. |
|
||||
| | `--status` | `bool` | `false` | Sai com código de saída diferente de zero se alguma das tarefas especificadas não estiver atualizada. |
|
||||
| | `--summary` | `bool` | `false` | Mostrar resumo sobre uma tarefa. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` ou `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Habilita modo verboso. |
|
||||
| | `--version` | `bool` | `false` | Mostrar versão do Task. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Habilita o monitoramento de tarefas. |
|
||||
|
||||
## Códigos de saída
|
||||
|
||||
O Task às vezes fecha com códigos de saída específicos. These codes are split into three groups with the following ranges:
|
||||
O Task às vezes fecha com códigos de saída específicos. Estes códigos são divididos em três grupos com os seguintes intervalos:
|
||||
|
||||
- Erros gerais (0-99)
|
||||
- Erros de Taskfile (100-199)
|
||||
@ -73,13 +73,13 @@ Uma lista completa dos códigos de saída e suas descrições podem ser encontra
|
||||
| 202 | O usuário tentou invocar uma tarefa que é interna |
|
||||
| 203 | Há várias tarefas com o mesmo nome ou apelido |
|
||||
| 204 | Uma tarefa foi chamada muitas vezes |
|
||||
| 205 | A task was cancelled by the user |
|
||||
| 205 | A tarefa foi cancelada pelo usuário |
|
||||
|
||||
These codes can also be found in the repository in [`errors/errors.go`](https://github.com/go-task/task/blob/main/errors/errors.go).
|
||||
Esses códigos também podem ser encontrados no repositório em [`errors/errors.go`](https://github.com/go-task/task/blob/main/errors/errors.go).
|
||||
|
||||
:::info
|
||||
|
||||
When Task is run with the `-x`/`--exit-code` flag, the exit code of any failed commands will be passed through to the user instead.
|
||||
Quando o Task é executado com o modificador `-x`/`--exit-code`, o código de saída de todos os comandos falhados será passado para o usuário.
|
||||
|
||||
:::
|
||||
|
||||
@ -109,56 +109,56 @@ Quando estiver usando o modificador `--json` em combinação com o modificador `
|
||||
|
||||
## Variáveis Especiais
|
||||
|
||||
There are some special variables that is available on the templating system:
|
||||
Há algumas variáveis especiais que são acessíveis via template:
|
||||
|
||||
| Var | Description |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `CLI_ARGS` | Contain all extra arguments passed after `--` when calling Task through the CLI. |
|
||||
| `TASK` | The name of the current task. |
|
||||
| `ROOT_DIR` | The absolute path of the root Taskfile. |
|
||||
| `TASKFILE_DIR` | The absolute path of the included Taskfile. |
|
||||
| `USER_WORKING_DIR` | The absolute path of the directory `task` was called from. |
|
||||
| `CHECKSUM` | The checksum of the files listed in `sources`. Only available within the `status` prop and if method is set to `checksum`. |
|
||||
| `TIMESTAMP` | The date object of the greatest timestamp of the files listes in `sources`. Only available within the `status` prop and if method is set to `timestamp`. |
|
||||
| `TASK_VERSION` | The current version of task. |
|
||||
| Variável | Descrição |
|
||||
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `CLI_ARGS` | Contém todos os argumentos extras passados depois de `--` quando invocando o Task via linha de comando. |
|
||||
| `TASK` | O nome da tarefa atual. |
|
||||
| `ROOT_DIR` | O caminho absoluto para o Taskfile raíz. |
|
||||
| `TASKFILE_DIR` | O caminho absoluto para o Taskfile incluído. |
|
||||
| `USER_WORKING_DIR` | O caminho absoluto a partir do qual o comando `task` foi invocado. |
|
||||
| `CHECKSUM` | O "checksum" dos arquivos listados em `sources`. Apenas disponível dentro do atributo `status` e se o método estiver configurado como `checksum`. |
|
||||
| `TIMESTAMP` | A maior data de modificação entre os arquivos listados em `sources`. Apenas disponível dentro do atributo `status` e se o método estiver configurado como `timestamp`. |
|
||||
| `TASK_VERSION` | A versão atual do Task. |
|
||||
|
||||
## ENV
|
||||
|
||||
Some environment variables can be overriden to adjust Task behavior.
|
||||
Algumas variáveis de ambiente podem ser configuradas para mudar o comportamento do Task.
|
||||
|
||||
| ENV | Default | Description |
|
||||
| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `TASK_TEMP_DIR` | `.task` | Location of the temp dir. Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. |
|
||||
| `TASK_COLOR_RESET` | `0` | Color used for white. |
|
||||
| `TASK_COLOR_BLUE` | `34` | Color used for blue. |
|
||||
| `TASK_COLOR_GREEN` | `32` | Color used for green. |
|
||||
| `TASK_COLOR_CYAN` | `36` | Color used for cyan. |
|
||||
| `TASK_COLOR_YELLOW` | `33` | Color used for yellow. |
|
||||
| `TASK_COLOR_MAGENTA` | `35` | Color used for magenta. |
|
||||
| `TASK_COLOR_RED` | `31` | Color used for red. |
|
||||
| `FORCE_COLOR` | | Force color output usage. |
|
||||
| Variável de Ambiente | Padrão | Descrição |
|
||||
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `TASK_TEMP_DIR` | `.task` | Caminho da pasta temporária. Pode ser um caminho relativo ao projeto como `tmp/task` ou um caminho absoluto como `/tmp/.task` ou `~/.task`. |
|
||||
| `TASK_COLOR_RESET` | `0` | Cor utilizada para branco. |
|
||||
| `TASK_COLOR_BLUE` | `34` | Cor utilizada para azul. |
|
||||
| `TASK_COLOR_GREEN` | `32` | Cor utilizada para verde. |
|
||||
| `TASK_COLOR_CYAN` | `36` | Cor utilizada para ciano. |
|
||||
| `TASK_COLOR_YELLOW` | `33` | Cor utilizada para amarelo. |
|
||||
| `TASK_COLOR_MAGENTA` | `35` | Cor utilizada para magenta. |
|
||||
| `TASK_COLOR_RED` | `31` | Cor utilizada para vermelho. |
|
||||
| `FORCE_COLOR` | | Forçar saída colorida no terminal. |
|
||||
|
||||
## Taskfile Schema
|
||||
## Esquema do Taskfile
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| ---------- | ---------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `version` | `string` | | Version of the Taskfile. The current version is `3`. |
|
||||
| `output` | `string` | `interleaved` | Output mode. Available options: `interleaved`, `group` and `prefixed`. |
|
||||
| `method` | `string` | `checksum` | Default method in this Taskfile. Can be overriden in a task by task basis. Available options: `checksum`, `timestamp` and `none`. |
|
||||
| `includes` | [`map[string]Include`](#include) | | Additional Taskfiles to be included. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | A set of global variables. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | A set of global environment variables. |
|
||||
| `tasks` | [`map[string]Task`](#task) | | A set of task definitions. |
|
||||
| `silent` | `bool` | `false` | Default 'silent' options for this Taskfile. If `false`, can be overidden with `true` in a task by task basis. |
|
||||
| `dotenv` | `[]string` | | A list of `.env` file paths to be parsed. |
|
||||
| `run` | `string` | `always` | Default 'run' option for this Taskfile. Available options: `always`, `once` and `when_changed`. |
|
||||
| `interval` | `string` | `5s` | Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|
||||
| `set` | `[]string` | | Specify options for the [`set` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Specify option for the [`shopt` builtin](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| ---------- | ---------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `version` | `string` | | Versão do Taskfile. A versão mais atual é a `3`. |
|
||||
| `output` | `string` | `interleaved` | Mode de saída. Opções disponíveis: `interleaved`, `group` e `prefixed`. |
|
||||
| `method` | `string` | `checksum` | O método padrão deste Taskfile. Pode ser sobre-escrito em cada tarefa individual. Opções disponíveis: `checksum` (conteúdo dos arquivos), `timestamp` (data/hora de modificação) e `none` (nenhum). |
|
||||
| `includes` | [`map[string]Include`](#include) | | Taskfiles adicionais a serem incluídos. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Um conjunto de variáveis globais. |
|
||||
| `env` | [`map[string]Variable`](#variable) | | Um conjunto de variáveis de ambiente globais. |
|
||||
| `tasks` | [`map[string]Task`](#task) | | Um conjunto de tarefas. |
|
||||
| `silent` | `bool` | `false` | Opção padrão para `silent` para este Taskfile. Se `false`, pode ser sobre-escrito com `true` em cada tarefa individual. |
|
||||
| `dotenv` | `[]string` | | Uma lista de arquivos `.env` para serem incluídos. |
|
||||
| `run` | `string` | `always` | Opção padrão para `run` para este Taskfile. Opções disponíveis: `always` (sempre), `once` (uma vez) e `when_changed` (quando mudou). |
|
||||
| `interval` | `string` | `5s` | Configura um intervalo de tempo diferente para `--watch`, sendo que o padrão é de 5 segundos. Essa string deve ser um [Go Duration](https://pkg.go.dev/time#ParseDuration) válido. |
|
||||
| `set` | `[]string` | | Configura opções para o builtin [`set`](https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html). |
|
||||
| `shopt` | `[]string` | | Configura opções para o builtin [`shopt`](https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html). |
|
||||
|
||||
### Include
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| ---------- | --------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `taskfile` | `string` | | The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. If a relative path, resolved relative to the directory containing the including Taskfile. |
|
||||
| `dir` | `string` | The parent Taskfile directory | The working directory of the included tasks when run. |
|
||||
@ -180,10 +180,10 @@ includes:
|
||||
|
||||
### Variable
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------ |
|
||||
| _itself_ | `string` | | A static value that will be set to the variable. |
|
||||
| `sh` | `string` | | A shell command. The output (`STDOUT`) will be assigned to the variable. |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| -------- | -------- | ------ | ------------------------------------------------------------------------ |
|
||||
| _itself_ | `string` | | A static value that will be set to the variable. |
|
||||
| `sh` | `string` | | A shell command. The output (`STDOUT`) will be assigned to the variable. |
|
||||
|
||||
:::info
|
||||
|
||||
@ -200,7 +200,7 @@ vars:
|
||||
|
||||
### Task
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| --------------- | ---------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmds` | [`[]Command`](#command) | | A list of shell commands to be executed. |
|
||||
| `deps` | [`[]Dependency`](#dependency) | | A list of dependencies of this task. Tasks defined here will run in parallel before this task. |
|
||||
@ -248,7 +248,7 @@ tasks:
|
||||
|
||||
#### Command
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| -------------- | ---------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cmd` | `string` | | The shell command to be executed. |
|
||||
| `silent` | `bool` | `false` | Skips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected. |
|
||||
@ -276,11 +276,11 @@ tasks:
|
||||
|
||||
#### Dependency
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | ---------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `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`. |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| -------- | ---------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `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
|
||||
|
||||
@ -296,10 +296,10 @@ tasks:
|
||||
|
||||
#### Precondition
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `sh` | `string` | | Command to be executed. If a non-zero exit code is returned, the task errors without executing its commands. |
|
||||
| `msg` | `string` | | Optional message to print if the precondition isn't met. |
|
||||
| Atributo | Tipo | Padrão | Descrição |
|
||||
| -------- | -------- | ------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `sh` | `string` | | Command to be executed. If a non-zero exit code is returned, the task errors without executing its commands. |
|
||||
| `msg` | `string` | | Optional message to print if the precondition isn't met. |
|
||||
|
||||
:::tip
|
||||
|
||||
|
@ -9,7 +9,7 @@ Some of the work to improve the Task ecosystem is done by the community, be it i
|
||||
|
||||
## Translations
|
||||
|
||||
[@DeronW](https://github.com/DeronW) maintains the [Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the website [on this repository](https://github.com/DeronW/task).
|
||||
We use [Crowdin](https://crowdin.com/project/taskfile) to translate our document.
|
||||
|
||||
## Integrations
|
||||
|
||||
|
@ -15,10 +15,14 @@ In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
1. Using the relevant environment variable in front of a task command. For example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off invocations of Task to test out experimental features.
|
||||
1. Using the relevant environment variable in your "dotfiles" (e.g. `.bashrc`, `.zshrc` etc.). This is intended for permanently enabling experimental features in your environment.
|
||||
1. Creating a `.env` file in the same directory as your root Taskfile that contains the relevant environment variables. e.g.
|
||||
|
||||
Flags will always override environment variables.
|
||||
```shell
|
||||
# .env
|
||||
TASK_X_FEATURE=1
|
||||
```
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
@ -26,11 +30,11 @@ Each section below details an experiment or deprecation and explains what the fl
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
### ![experiment] {Feature} ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Environment variable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
- Breaks: {list any existing functionality that will be broken by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
@ -46,9 +50,21 @@ This notice does not mean that we are immediately removing support for version 2
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment][] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status checks. This can be useful, but we have found that most of the time users only expect the direct task they are calling to be forced and _not_ all of its dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called task. All dependant tasks will have their statuses checked as normal and will only run if Task considers them to be out of date. A new `--force-all` flag will also be added to maintain the current behavior for users that need this functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
|
@ -37,9 +37,13 @@ If you omit a task name, "default" will be assumed.
|
||||
Task will look for the following file names, in order of priority:
|
||||
|
||||
- Taskfile.yml
|
||||
- taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- taskfile.dist.yml
|
||||
- Taskfile.dist.yaml
|
||||
- taskfile.dist.yaml
|
||||
|
||||
The intention of having the `.dist` variants is to allow projects to have one committed version (`.dist`) while still allowing individual users to override the Taskfile by adding an additional `Taskfile.yml` (which would be on `.gitignore`).
|
||||
|
||||
@ -65,7 +69,7 @@ In this example, we can run `cd <service>` and `task up` and as long as the `<se
|
||||
|
||||
### Running a global Taskfile
|
||||
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile on either `$HOME/Taskfile.yml` or `$HOME/Taskfile.yaml` paths.
|
||||
If you call Task with the `--global` (alias `-g`) flag, it will look for your home directory instead of your working directory. In short, Task will look for a Taskfile that matches `$HOME/{T,t}askfile.{yml,yaml}` .
|
||||
|
||||
This is useful to have automation that you can run from anywhere in your system!
|
||||
|
||||
|
@ -9,7 +9,7 @@ sidebar_position: 10
|
||||
|
||||
## Переводчики
|
||||
|
||||
[@DeronW](https://github.com/DeronW) поддерживает [Китайский перевод](https://task-zh.readthedocs.io/zh_CN/latest/) на сайте [в этом репозитории](https://github.com/DeronW/task).
|
||||
We use [Crowdin](https://crowdin.com/project/taskfile) to translate our document.
|
||||
|
||||
## Интеграции
|
||||
|
||||
|
@ -15,10 +15,14 @@ In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
1. Using the relevant environment variable in front of a task command. For example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off invocations of Task to test out experimental features.
|
||||
1. Using the relevant environment variable in your "dotfiles" (e.g. `.bashrc`, `.zshrc` etc.). This is intended for permanently enabling experimental features in your environment.
|
||||
1. Creating a `.env` file in the same directory as your root Taskfile that contains the relevant environment variables. e.g.
|
||||
|
||||
Flags will always override environment variables.
|
||||
```shell
|
||||
# .env
|
||||
TASK_X_FEATURE=1
|
||||
```
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
@ -26,11 +30,11 @@ Each section below details an experiment or deprecation and explains what the fl
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
### ![experiment] {Feature} ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Environment variable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
- Breaks: {list any existing functionality that will be broken by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
@ -46,9 +50,21 @@ This notice does not mean that we are immediately removing support for version 2
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment][] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status checks. This can be useful, but we have found that most of the time users only expect the direct task they are calling to be forced and _not_ all of its dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called task. All dependant tasks will have their statuses checked as normal and will only run if Task considers them to be out of date. A new `--force-all` flag will also be added to maintain the current behavior for users that need this functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
|
@ -37,9 +37,13 @@ Task использует [mvdan.cc/sh](https://mvdan.cc/sh/) - нативный
|
||||
Task будет искать следующие файлы, в порядке приоритета:
|
||||
|
||||
- Taskfile.yml
|
||||
- taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- taskfile.dist.yml
|
||||
- Taskfile.dist.yaml
|
||||
- taskfile.dist.yaml
|
||||
|
||||
Идея создания вариантов `.dist` заключается в том, чтобы позволить проектам иметь одну фиксированную версию (`.dist`), при этом позволяя отдельным пользователям переопределить Taskfile, добавив дополнительный `Taskfile.yml` (который будет находится в `.gitignore`).
|
||||
|
||||
@ -65,7 +69,7 @@ tasks:
|
||||
|
||||
### Запуск глобального Taskfile
|
||||
|
||||
Если вы вызовите Task с помощью флага `--global` (псевдоним `-g`), будет искать ваш домашний каталог вместо рабочего каталога. Проще говоря, Task будет искать в `$HOME/Taskfile.yml` или `$HOME/Taskfile.yaml`.
|
||||
Если вы вызовите Task с помощью флага `--global` (псевдоним `-g`), будет искать ваш домашний каталог вместо рабочего каталога. In short, Task will look for a Taskfile that matches `$HOME/{T,t}askfile.{yml,yaml}` .
|
||||
|
||||
Это полезно, чтобы иметь автоматизацию, которую можно запустить из любого места вашей системы!
|
||||
|
||||
|
@ -9,7 +9,7 @@ sidebar_position: 10
|
||||
|
||||
## 翻译
|
||||
|
||||
[@DeronW](https://github.com/DeronW) 在 [此存储库](https://github.com/DeronW/task) 中维护网站的 [中文翻译](https://task-zh.readthedocs.io/zh_CN/latest/)。
|
||||
We use [Crowdin](https://crowdin.com/project/taskfile) to translate our document.
|
||||
|
||||
## 集成
|
||||
|
||||
|
@ -15,10 +15,14 @@ In order to allow Task to evolve quickly, we roll out breaking changes to minor
|
||||
|
||||
You can enable an experimental feature by:
|
||||
|
||||
1. Using the `--x-{feature}` flag. This is intended for one-off invocations of Task to test out experimental features. You can also disable a feature by specifying a falsy value such as `--x-{feature}=false`.
|
||||
1. Using the `TASK_X_{FEATURE}=1` environment variable. This is intended for permanently enabling experimental features in your environment.
|
||||
1. Using the relevant environment variable in front of a task command. For example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off invocations of Task to test out experimental features.
|
||||
1. Using the relevant environment variable in your "dotfiles" (e.g. `.bashrc`, `.zshrc` etc.). This is intended for permanently enabling experimental features in your environment.
|
||||
1. Creating a `.env` file in the same directory as your root Taskfile that contains the relevant environment variables. e.g.
|
||||
|
||||
Flags will always override environment variables.
|
||||
```shell
|
||||
# .env
|
||||
TASK_X_FEATURE=1
|
||||
```
|
||||
|
||||
## Current Experimental Features and Deprecations
|
||||
|
||||
@ -26,11 +30,11 @@ Each section below details an experiment or deprecation and explains what the fl
|
||||
|
||||
<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
|
||||
|
||||
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
### ![experiment] {Feature} ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
|
||||
|
||||
- Flag to enable: `--x-{feature}`
|
||||
- Env to enable: `TASK_X_{feature}`
|
||||
- Environment variable: `TASK_X_{feature}`
|
||||
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
|
||||
- Breaks: {list any existing functionality that will be broken by this experiment}
|
||||
|
||||
{Short description of the feature}
|
||||
|
||||
@ -46,9 +50,21 @@ This notice does not mean that we are immediately removing support for version 2
|
||||
|
||||
A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].
|
||||
|
||||
### ![experiment][] Gentle Force ([#1200](https://github.com/go-task/task/issues/1200))
|
||||
|
||||
- Environment variable: `TASK_X_FORCE=1`
|
||||
- Breaks: `--force` flag
|
||||
|
||||
The `--force` flag currently forces _all_ tasks to run regardless of the status checks. This can be useful, but we have found that most of the time users only expect the direct task they are calling to be forced and _not_ all of its dependant tasks.
|
||||
|
||||
This experiment changes the `--force` flag to only force the directly called task. All dependant tasks will have their statuses checked as normal and will only run if Task considers them to be out of date. A new `--force-all` flag will also be added to maintain the current behavior for users that need this functionality.
|
||||
|
||||
If you want to migrate, but continue to force all dependant tasks to run, you should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
[deprecate-version-2-schema]: https://github.com/go-task/task/issues/1197
|
||||
[version-3-release-notes]: https://github.com/go-task/task/releases/tag/v3.0.0
|
||||
[deprecated]: https://img.shields.io/badge/deprecated-red
|
||||
[experiment]: https://img.shields.io/badge/experiment-yellow
|
||||
|
@ -37,9 +37,13 @@ Task 使用 [mvdan.cc/sh](https://mvdan.cc/sh/),一个原生的 Go sh 解释
|
||||
Task 会按以下顺序查找配置文件:
|
||||
|
||||
- Taskfile.yml
|
||||
- taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- taskfile.dist.yml
|
||||
- Taskfile.dist.yaml
|
||||
- taskfile.dist.yaml
|
||||
|
||||
使用 `.dist` 变体的目的是允许项目有一个提交版本 (`.dist`),同时仍然允许个人用户通过添加额外的 `Taskfile.yml`(将在 `.gitignore` 上)来覆盖 Taskfile。
|
||||
|
||||
@ -65,7 +69,7 @@ tasks:
|
||||
|
||||
### 运行全局 Taskfile
|
||||
|
||||
如果您使用 `--global`(别名 `-g`)标志调用 Task,它将查找您的 home 目录而不是您的工作目录。 简而言之,Task 将在 `$HOME/Taskfile.yml` 或 `$HOME/Taskfile.yaml` 路径上寻找 Taskfile。
|
||||
如果您使用 `--global`(别名 `-g`)标志调用 Task,它将查找您的 home 目录而不是您的工作目录。 In short, Task will look for a Taskfile that matches `$HOME/{T,t}askfile.{yml,yaml}` .
|
||||
|
||||
这对于您可以在系统的任何地方运行的自动化很有用!
|
||||
|
||||
|
Reference in New Issue
Block a user