mirror of
https://github.com/go-task/task.git
synced 2026-06-28 23:24:25 +00:00
chore: sync translations (#1180)
This commit is contained in:
@@ -5,7 +5,7 @@ toc_min_heading_level: 2
|
||||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
# API Reference
|
||||
# Справочник API
|
||||
|
||||
## CLI
|
||||
|
||||
@@ -21,34 +21,34 @@ If `--` is given, all remaning arguments will be assigned to a special `CLI_ARGS
|
||||
|
||||
:::
|
||||
|
||||
| Short | Flag | Type | Default | Description |
|
||||
| ----- | --------------------------- | -------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
||||
| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. |
|
||||
| `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. |
|
||||
| `-g` | `--global` | `bool` | `false` | Runs global Taskfile, from `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Shows Task usage. |
|
||||
| `-i` | `--init` | `bool` | `false` | Creates a new Taskfile.yml in the current folder. |
|
||||
| `-I` | `--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). |
|
||||
| `-l` | `--list` | `bool` | `false` | Lists tasks with description of current Taskfile. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lists tasks with or without a description. |
|
||||
| | `--sort` | `string` | `default` | Changes the order of the tasks when listed. |
|
||||
| | `--json` | `bool` | `false` | See [JSON Output](#json-output) |
|
||||
| `-o` | `--output` | `string` | Default set in the Taskfile or `intervealed` | Sets output style: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Message template to print before a task's grouped output. |
|
||||
| | `--output-group-end` | `string` | | Message template to print after a task's grouped output. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Swallow command output on zero exit code. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executes tasks provided on command line in parallel. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Disables echoing. |
|
||||
| | `--status` | `bool` | `false` | Exits with non-zero exit code if any of the given tasks is not up-to-date. |
|
||||
| | `--summary` | `bool` | `false` | Show summary about a task. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` or `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
||||
| | `--version` | `bool` | `false` | Show Task version. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task. |
|
||||
| Сокращение | Флаг | Тип | По умолчанию | Описание |
|
||||
| ---------- | --------------------------- | -------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
||||
| `-d` | `--dir` | `string` | Working directory | Sets directory of execution. |
|
||||
| `-n` | `--dry` | `bool` | `false` | Compiles and prints tasks in the order that they would be run, without executing them. |
|
||||
| `-x` | `--exit-code` | `bool` | `false` | Pass-through the exit code of the task command. |
|
||||
| `-f` | `--force` | `bool` | `false` | Forces execution even when the task is up-to-date. |
|
||||
| `-g` | `--global` | `bool` | `false` | Runs global Taskfile, from `$HOME/Taskfile.{yml,yaml}`. |
|
||||
| `-h` | `--help` | `bool` | `false` | Shows Task usage. |
|
||||
| `-i` | `--init` | `bool` | `false` | Creates a new Taskfile.yml in the current folder. |
|
||||
| `-I` | `--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). |
|
||||
| `-l` | `--list` | `bool` | `false` | Lists tasks with description of current Taskfile. |
|
||||
| `-a` | `--list-all` | `bool` | `false` | Lists tasks with or without a description. |
|
||||
| | `--sort` | `string` | `default` | Changes the order of the tasks when listed. |
|
||||
| | `--json` | `bool` | `false` | See [JSON Output](#json-output) |
|
||||
| `-o` | `--output` | `string` | Default set in the Taskfile or `intervealed` | Sets output style: [`interleaved`/`group`/`prefixed`]. |
|
||||
| | `--output-group-begin` | `string` | | Message template to print before a task's grouped output. |
|
||||
| | `--output-group-end` | `string` | | Message template to print after a task's grouped output. |
|
||||
| | `--output-group-error-only` | `bool` | `false` | Swallow command output on zero exit code. |
|
||||
| `-p` | `--parallel` | `bool` | `false` | Executes tasks provided on command line in parallel. |
|
||||
| `-s` | `--silent` | `bool` | `false` | Disables echoing. |
|
||||
| | `--status` | `bool` | `false` | Exits with non-zero exit code if any of the given tasks is not up-to-date. |
|
||||
| | `--summary` | `bool` | `false` | Show summary about a task. |
|
||||
| `-t` | `--taskfile` | `string` | `Taskfile.yml` or `Taskfile.yaml` | |
|
||||
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
||||
| | `--version` | `bool` | `false` | Show Task version. |
|
||||
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task. |
|
||||
|
||||
## Exit Codes
|
||||
|
||||
@@ -60,7 +60,7 @@ Task will sometimes exit with specific exit codes. These codes are split into th
|
||||
|
||||
A full list of the exit codes and their descriptions can be found below:
|
||||
|
||||
| Code | Description |
|
||||
| Code | Описание |
|
||||
| ---- | ------------------------------------------------------------ |
|
||||
| 0 | Success |
|
||||
| 1 | An unknown error occurred |
|
||||
@@ -103,11 +103,11 @@ When using the `--json` flag in combination with either the `--list` or `--list-
|
||||
}
|
||||
```
|
||||
|
||||
## Special Variables
|
||||
## Специальные переменные
|
||||
|
||||
There are some special variables that is available on the templating system:
|
||||
|
||||
| Var | Description |
|
||||
| Переменные | Описание |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `CLI_ARGS` | Contain all extra arguments passed after `--` when calling Task through the CLI. |
|
||||
| `TASK` | The name of the current task. |
|
||||
@@ -136,7 +136,7 @@ Some environment variables can be overriden to adjust Task behavior.
|
||||
|
||||
## Taskfile Schema
|
||||
|
||||
| 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`. |
|
||||
@@ -154,7 +154,7 @@ Some environment variables can be overriden to adjust Task behavior.
|
||||
|
||||
### Include
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Атрибут | Тип | По умолчанию | Описание |
|
||||
| ---------- | --------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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. |
|
||||
@@ -176,10 +176,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. |
|
||||
| Атрибут | Тип | По умолчанию | Описание |
|
||||
| -------- | -------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| _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
|
||||
|
||||
@@ -196,7 +196,7 @@ vars:
|
||||
|
||||
### Task
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Атрибут | Тип | По умолчанию | Описание |
|
||||
| --------------- | ---------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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. |
|
||||
@@ -243,7 +243,7 @@ tasks:
|
||||
|
||||
#### Command
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
| Атрибут | Тип | По умолчанию | Описание |
|
||||
| -------------- | ---------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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. |
|
||||
@@ -271,10 +271,10 @@ 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. |
|
||||
| Атрибут | Тип | По умолчанию | Описание |
|
||||
| ------- | ---------------------------------- | ------------ | -------------------------------------------------------- |
|
||||
| `task` | `string` | | The task to be execute as a dependency. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to this task. |
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -290,10 +290,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. |
|
||||
| Атрибут | Тип | По умолчанию | 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. |
|
||||
|
||||
:::tip
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ slug: /community/
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Community
|
||||
# Сообщество
|
||||
|
||||
Some of the work to improve the Task ecosystem is done by the community, be it installation methods or integrations with code editor. I (the author) am thankful for everyone that helps me to improve the overall experience.
|
||||
|
||||
## 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).
|
||||
|
||||
|
||||
@@ -3,79 +3,79 @@ slug: /contributing/
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Contributing
|
||||
# Помощь проекту
|
||||
|
||||
Contributions to Task are very welcome, but we ask that you read this document before submitting a PR.
|
||||
Любой вклад в Task очень приветствуется, но мы просим вас прочитать этот документ, прежде чем отправлять pull request(PR).
|
||||
|
||||
:::note
|
||||
|
||||
This document applies to the core [Task][task] repository _and_ [Task for Visual Studio Code][vscode-task].
|
||||
Этот документ относится к основному репозиторию [Task][task] _и_ [ Task for Visual Studio Code][vscode-task]
|
||||
|
||||
:::
|
||||
|
||||
## Before you start
|
||||
## Введение
|
||||
|
||||
- **Check existing work** - Is there an existing PR? Are there issues discussing the feature/change you want to make? Please make sure you consider/address these discussions in your work.
|
||||
- **Backwards compatibility** - Will your change break existing Taskfiles? It is much more likely that your change will merged if it backwards compatible. Is there an approach you can take that maintains this compatibility? If not, consider opening an issue first so that API changes can be discussed before you invest your time into a PR.
|
||||
- **Текущее состояние разработки** - Проверьте уже открытые PR. Есть ли открытые "issues", обсуждающие особенности/изменения, которые вы хотите выполнить? Пожалуйста, убедитесь, что вы учитываете результаты этих обсуждений в своей работе.
|
||||
- **Обратная совместимость** - Повлияют ли ваши изменения на уже существующие TaskFile'ы? Скорее всего, ваше изменение будет применено, если оно обладает обратной совместимостью. Существует ли подход, который вы можете использовать для поддержания обратной совместимости? Если нет, откройте проблему(Вот тут ["Issues"](https://github.com/go-task/task/issues)), чтобы изменения API могли быть обсуждены до того, как вы потратите своё время на PR.
|
||||
|
||||
## 1. Setup
|
||||
## 1. Настройка
|
||||
|
||||
- **Go** - Task is written in [Go][go]. We always support the latest two major Go versions, so make sure your version is recent enough.
|
||||
- **Node.js** - [Node.js][nodejs] is used to host Task's documentation server and is required if you want to run this server locally. It is also required if you want to contribute to the Visual Studio Code extension.
|
||||
- **Yarn** - [Yarn][yarn] is the Node.js package manager used by Task.
|
||||
- **Go** - Task написан на [Go][go]. Мы всегда поддерживаем две последних основных версий Go, поэтому убедитесь, что у вас установлена актуальная версия.
|
||||
- **Node.js** - [Node.js][nodejs] используется для хостинга сервера документации Task и требуется для локального запуска этого сервера. Node.js также необходим для того, чтобы внести свой вклад в расширение Visual Studio Code.
|
||||
- **Yarn** - [Yarn][yarn] является менеджером пакетов Node.js, используемым в Task.
|
||||
|
||||
## 2. Making changes
|
||||
## 2. Внести изменения
|
||||
|
||||
- **Code style** - Try to maintain the existing code style where possible. Go code should be formatted by [`gofumpt`][gofumpt] and linted using [`golangci-lint`][golangci-lint]. Any Markdown or TypeScript files should be formatted and linted by [Prettier][prettier]. This style is enforced by our CI to ensure that we have a consistent style across the project. You can use the `task lint` command to lint the code locally and the `task lint:fix` command to automatically fix any issues that are found.
|
||||
- **Documentation** - Ensure that you add/update any relevant documentation. See the [updating documentation](#updating-documentation) section below.
|
||||
- **Tests** - Ensure that you add/update any relevant tests and that all tests are passing before submitting the PR. See the [writing tests](#writing-tests) section below.
|
||||
- **Code style** - Настоятельно рекомендуем поддерживать существующий стиль кода по мере возможности. Код должен быть отформатирован [`gofumpt`][gofumpt] и проверен [`golangci-lint`][golangci-lint] линтером. Любые файлы Markdown или TypeScript должны быть отформатированы с помощью [Prettier][prettier]. Стиль кода внедряется нашим CI для обеспечения того, чтобы у всех был одинаковый стиль кода в рамках проекта. Вы можете использовать команду `task lint` для локальной проверки линтером и `task lint:fix` для автоматического исправления любых обнаруженных проблем.
|
||||
- **Документация** - Убедитесь, что вы добавляете/обновляете любую соответствующую документацию. Секцию [обновления документации](#updating-documentation) можно увидеть ниже.
|
||||
- **Тесты** - Убедитесь, что вы добавляете/обновляете любые релевантные тесты и что все тесты проходят перед отправкой PR. Секцию [написание тестов](#writing-tests) можно увидеть ниже.
|
||||
|
||||
### Running your changes
|
||||
### Запуск ваших изменений
|
||||
|
||||
To run Task with working changes, you can use `go run ./cmd/task`. To run a development build of task against a test Taskfile in `testdata`, you can use `go run ./cmd/task --dir ./testdata/<my_test_dir> <task_name>`.
|
||||
Чтобы запустить Task с рабочими изменениями, используйте `go run ./cmd/task`. Для запуска тестовой сборки задачи с Taskfile в `testdata`, вы можете использовать `go run ./cmd/task --dir ./testdata/<my_test_dir> <task_name>`.
|
||||
|
||||
To run Task for Visual Studio Code, you can open the project in VSCode and hit F5 (or whatever you debug keybind is set to). This will open a new VSCode window with the extension running. Debugging this way is recommended as it will allow you to set breakpoints and step through the code. Otherwise, you can run `task package` which will generate a `.vsix` file that can be used to manually install the extension.
|
||||
Для запуска Task для Visual Studio кода, вы можете открыть проект в VSCode и нажать F5 (или любую другую клавишу, к которой вы привязали функцию отладки). Это откроет новое окно VSCode с запущенным расширением. Мы рекомендуем использовать функцию отладки, так как это позволит вам задать точки останова. Также вы можете запустить пакет задач `task package` для генерации `.vsix` файла, который может быть использован для ручной установки расширения.
|
||||
|
||||
### Updating documentation
|
||||
### Обновление документации
|
||||
|
||||
Task uses [Docusaurus][docusaurus] to host a documentation server. The code for this is located in the core Task repository. This can be setup and run locally by using `task docs` (requires `nodejs` & `yarn`). All content is written in Markdown and is located in the `docs/docs` directory. All Markdown documents should have an 80 character line wrap limit (enforced by Prettier).
|
||||
Task использует [Docusaurus][docusaurus] для размещения сервера документации. Код для неё находится в основном Task репозитории. Документация может быть настроена и запущена локально с помощью `task docs` (требуется установка `nodejs` & `yarn`). Все содержимое написано в Markdown и находится в директории `docs/docs`. Все документы Markdown должны иметь максимальную длину строки 80 символов (этого требует Prettier).
|
||||
|
||||
When making a change, consider whether a change to the [Usage Guide](./usage.md) is necessary. This document contains descriptions and examples of how to use Task features. If you're adding a new feature, try to find an appropriate place to add a new section. If you're updating an existing feature, ensure that the documentation and any examples are up-to-date. Ensure that any examples follow the [Taskfile Styleguide](./styleguide.md).
|
||||
При внесении изменений подумайте, является ли необходимым изменение [Руководства по использованию](./usage.md). Этот документ содержит описания и примеры использования Task функций. Если вы добавляете новую функцию, попробуйте найти подходящее место для добавления новой секции. Если вы обновляете существующую функцию, убедитесь, что документация и любые примеры актуальны. Убедитесь, что любые примеры следуют [Taskfile Styleguide](./styleguide.md).
|
||||
|
||||
If you added a new field, command or flag, ensure that you add it to the [API Reference](./api_reference.md). New fields also need to be added to the [JSON Schema][json-schema]. The descriptions for fields in the API reference and the schema should match.
|
||||
Если вы добавили новое поле, команду или флаг, убедитесь, что вы добавляете его в [Справочник API](./api_reference.md). Новые поля также необходимо добавить в [JSON][json-schema] схему. Описания полей в справочнике API и JSON схеме должны совпадать.
|
||||
|
||||
### Writing tests
|
||||
### Написание тестов
|
||||
|
||||
A lot of Task's tests are held in the `task_test.go` file in the project root and this is where you'll most likely want to add new ones too. Most of these tests also have a subdirectory in the `testdata` directory where any Taskfiles/data required to run the tests are stored.
|
||||
Тесты расположены в файле `task_test.go` в корневом каталоге, рекомендуем добавлять новые тесты именно в него. Большинство этих тестов также имеют поддиректорию в `testdata`, где хранятся любые Taskfiles/данные, необходимые для запуска тестов.
|
||||
|
||||
When making a changes, consider whether new tests are required. These tests should ensure that the functionality you are adding will continue to work in the future. Existing tests may also need updating if you have changed Task's behavior.
|
||||
При внесении изменений подумайте о необходимости новых тестов. Эти тесты должны гарантировать, что функционал, который вы добавили, продолжит работу в будущем. Существующие тесты также могут потребовать обновления, если вы изменили поведение Task.
|
||||
|
||||
You may also consider adding unit tests for any new functions you have added. The unit tests should follow the Go convention of being location in a file named `*_test.go` in the same package as the code being tested.
|
||||
Вы также можете добавить модульный тест для любых новых функций, которые добавляете. Модульные тесты должны следовать Go соглашению о местоположении в файле `*_test.o` в том же пакете, что и тестируемый код.
|
||||
|
||||
## 3. Committing your code
|
||||
## 3. Внесение кода
|
||||
|
||||
Try to write meaningful commit messages and avoid having too many commits on the PR. Most PRs should likely have a single commit (although for bigger PRs it may be reasonable to split it in a few). Git squash and rebase is your friend!
|
||||
Попробуйте написать содержательное сообщение к коммиту и не иметь слишком много коммитов в PR. Большинство PR, желательно, должны иметь один коммит (хотя для больших PR может быть разумным разделить его несколько коммитов). Используйте git squash и rebase!
|
||||
|
||||
If you're not sure how to format your commit message, check out [Conventional Commits][conventional-commits]. This style is not enforced, but it is a good way to make your commit messages more readable and consistent.
|
||||
Если вы не уверены, как отформатировать ваше сообщение, проверьте [Соглашение о коммитах][conventional-commits]. Этот стиль не используется в проекте, но это хороший способ сделать ваше сообщение для коммита более читаемым и последовательным.
|
||||
|
||||
## 4. Submitting a PR
|
||||
## 4. Отправка PR
|
||||
|
||||
- **Describe your changes** - Ensure that you provide a comprehensive description of your changes.
|
||||
- **Issue/PR links** - Link any previous work such as related issues or PRs. Please describe how your changes differ to/extend this work.
|
||||
- **Examples** - Add any examples or screenshots that you think are useful to demonstrate the effect of your changes.
|
||||
- **Draft PRs** - If your changes are incomplete, but you would like to discuss them, open the PR as a draft and add a comment to start a discussion. Using comments rather than the PR description allows the description to be updated later while preserving any discussions.
|
||||
- **Опишите ваши изменения** - Убедитесь, что вы предоставили подробное описание ваших изменений.
|
||||
- **Issue/PR ссылки** - Укажите ссылки на предыдущую работу, которая связанна с вашим PR. Пожалуйста, опишите, как ваши изменения изменяют или расширяют эту работу.
|
||||
- **Примеры** - Добавьте любые примеры или скриншоты, которые демонстрируют ваши изменения.
|
||||
- **Черновик PRs** - Если ваши изменения не закончены, но вы хотели бы обсудить их, открыть PR как черновик и добавьте комментарии, чтобы начать обсуждение. Использование комментариев, а не PR описания позволяет обновить описание позже при сохранении любых обсуждений.
|
||||
|
||||
## FAQ
|
||||
## Ответы на вопросы
|
||||
|
||||
> I want to contribute, where do I start?
|
||||
> Я хочу внести свой вклад, с чего начать?
|
||||
|
||||
Take a look at the list of [open issues for Task][task-open-issues] or [Task for Visual Studio Code][vscode-task-open-issues]. We have a [good first issue][good-first-issue] label for simpler issues that are ideal for first time contributions.
|
||||
Ознакомьтесь со списком [open issues for Task][task-open-issues] или [Task for Visual Studio Code][vscode-task-open-issues]. У нас есть лейбл [good first issue][good-first-issue] для простейших проблем, который идеально подходит для контрибьюторов, который первых вносят свой вклад.
|
||||
|
||||
All kinds of contributions are welcome, whether its a typo fix or a shiny new feature. You can also contribute by upvoting/commenting on issues, helping to answer questions or contributing to other [community projects](./community.md).
|
||||
Приветствуются всевозможные вклады, будь то маленький фикс или новая функция. Вы также можете внести свой вклад, комментируя вопросы, помогая ответить на вопросы или внести вклад в другие [проекты сообщества](./community.md).
|
||||
|
||||
> I'm stuck, where can I get help?
|
||||
> Где можно получить помощь?
|
||||
|
||||
If you have questions, feel free to ask them in the `#help` forum channel on our [Discord server][discord-server] or open a [Discussion][discussion] on GitHub.
|
||||
Если у вас есть вопросы, не стесняйтесь спросить их в канале `#help` на нашем [Discord сервере][discord-server] или откройте [Discussion][discussion] на GitHub.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,40 +3,40 @@ slug: /donate/
|
||||
sidebar_position: 13
|
||||
---
|
||||
|
||||
# Donate
|
||||
# Поддержать
|
||||
|
||||
If you find this project useful, you can consider donating by using one of the channels listed below.
|
||||
Если вам нравится этот проект, вы можете подумать о том, чтобы пожертвовать, используя один из способов, перечисленных ниже.
|
||||
|
||||
This is just a way of saying "thank you", it won't give you any benefits like higher priority on issues or something similar.
|
||||
Это просто способ сказать "спасибо", это не дает вам никаких преимуществ, таких как высший приоритет при рассмотрении проблем или что-то подобное.
|
||||
|
||||
Companies who donate at least $50/month will be featured as a "Gold Sponsor" in the website homepage and on the GitHub repository README. Make contact with [@andreynering][] with the logo you want to be shown. Suspect businesses (gambling, casinos, etc) won't be allowed, though.
|
||||
Компании, которые пожертвуют не менее $50 в месяц, будут представлены как "Золотые спонсоры" на главной странице сайта и в README репозитория на GitHub. Свяжитесь с [@andreynering][] и предоставьте ему нужный логотип. Подозрительные бизнесы (связанные с азартными играми, казино и т.д.) не будут допущены к спонсорству.
|
||||
|
||||
## GitHub Sponsors
|
||||
|
||||
The preferred way to donate to the maintainers is via GitHub Sponsors. Just use the following links to do your donation:
|
||||
Предпочтительный способ пожертвования для сопровождающих — через GitHub Sponsors. Просто используйте следующие ссылки, чтобы сделать пожертвование:
|
||||
|
||||
- [@andreynering](https://github.com/sponsors/andreynering)
|
||||
- [@pd93](https://github.com/sponsors/pd93)
|
||||
|
||||
## Open Collective
|
||||
|
||||
If you prefer [Open Collective](https://opencollective.com/task) you can donate by using these links:
|
||||
Если вы предпочитаете [Open Collective](https://opencollective.com/task), вы можете пожертвовать используя следующие ссылки:
|
||||
|
||||
- [$2 per month](https://opencollective.com/task/contribute/backer-4034/checkout)
|
||||
- [$5 per month](https://opencollective.com/task/contribute/supporter-8404/checkout)
|
||||
- [$20 per month](https://opencollective.com/task/contribute/sponsor-4035/checkout)
|
||||
- [$50 per month](https://opencollective.com/task/contribute/sponsor-28775/checkout)
|
||||
- [Custom value - One-time donation option supported](https://opencollective.com/task/donate)
|
||||
- [$2 в месяц](https://opencollective.com/task/contribute/backer-4034/checkout)
|
||||
- [$5 в месяц](https://opencollective.com/task/contribute/supporter-8404/checkout)
|
||||
- [$20 в месяц](https://opencollective.com/task/contribute/sponsor-4035/checkout)
|
||||
- [$50 в месяц](https://opencollective.com/task/contribute/sponsor-28775/checkout)
|
||||
- [Любая сумма - Разовое пожертвование](https://opencollective.com/task/donate)
|
||||
|
||||
## PayPal
|
||||
|
||||
You can donate to [@andreynering][] via PayPal as well:
|
||||
Вы можете сделать пожертвование [@andreynering][] через PayPal:
|
||||
|
||||
- [Any value - One-time donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A¤cy_code=USD&source=url)
|
||||
- [Любая сумма - Разовое пожертвование](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A¤cy_code=USD&source=url)
|
||||
|
||||
## PIX (Brazil only)
|
||||
## PIX (только для Бразилии)
|
||||
|
||||
And if you're Brazilian, you can also donate to [@andreynering][] via PIX by [using this QR Code](/img/pix.png).
|
||||
Если вы из Бразилии, вы можете также пожертвовать [@andreynering][] через PIX [с помощью этого QR-кода](/img/pix.png).
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
|
||||
@@ -3,23 +3,23 @@ slug: /installation/
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Installation
|
||||
# Установка
|
||||
|
||||
Task offers many installation methods. Check out the available methods below.
|
||||
Task имеет множество способов установки. Просмотрите доступные методы ниже.
|
||||
|
||||
## Package Managers
|
||||
## Менеджеры пакетов
|
||||
|
||||
### Homebrew
|
||||
|
||||
If you're on macOS or Linux and have [Homebrew][homebrew] installed, getting Task is as simple as running:
|
||||
Если вы используете macOS или Linux и установили [Homebrew][homebrew], то для установки достаточно выполнить:
|
||||
|
||||
```bash
|
||||
brew install go-task/tap/go-task
|
||||
```
|
||||
|
||||
The above Formula is [maintained by ourselves](https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb).
|
||||
Данная Formula [поддерживается нами](https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb).
|
||||
|
||||
Recently, Task was also made available [on the official Homebrew repository](https://formulae.brew.sh/formula/go-task), so you also have that option if you prefer:
|
||||
Недавно Task стал доступен [в официальном репозитории Homebrew](https://formulae.brew.sh/formula/go-task), поэтому вы можете использовать:
|
||||
|
||||
```bash
|
||||
brew install go-task
|
||||
@@ -27,7 +27,7 @@ brew install go-task
|
||||
|
||||
### Snap
|
||||
|
||||
Task is available in [Snapcraft][snapcraft], but keep in mind that your Linux distribution should allow classic confinement for Snaps to Task work right:
|
||||
Task доступен в [Snapcraft][snapcraft], но имейте в виду, что ваш Linux дистрибутив должен иметь классическое ограничение для Snaps, чтобы Task работал правильно:
|
||||
|
||||
```bash
|
||||
sudo snap install task --classic
|
||||
@@ -35,63 +35,63 @@ sudo snap install task --classic
|
||||
|
||||
### Chocolatey
|
||||
|
||||
If you're on Windows and have [Chocolatey][choco] installed, getting Task is as simple as running:
|
||||
Если вы используете Windows и у вас установлен [Chocolatey][choco], установка Task сводится к запуску:
|
||||
|
||||
```bash
|
||||
choco install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
Этот метод установки находится под управлением сообщества.
|
||||
|
||||
### Scoop
|
||||
|
||||
If you're on Windows and have [Scoop][scoop] installed, getting Task is as simple as running:
|
||||
Если вы используете Windows и у вас установлен [Scoop][scoop], установка Task сводится к запуску:
|
||||
|
||||
```cmd
|
||||
scoop install task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available on Scoop.
|
||||
Этот метод установки находится под управлением сообщества. После нового релиза Task может потребоваться некоторое время, пока он станет доступен в Scoop.
|
||||
|
||||
### AUR
|
||||
|
||||
If you're on Arch Linux you can install Task from [AUR](https://aur.archlinux.org/packages/go-task-bin) using your favorite package manager such as `yay`, `pacaur` or `yaourt`:
|
||||
Если вы используете Arch Linux, вы можете установить Task из [AUR](https://aur.archlinux.org/packages/go-task-bin) с помощью вашего любимого менеджера пакетов, такого как `yay`, `pacaur` или `yaourt`:
|
||||
|
||||
```cmd
|
||||
yay -S go-task-bin
|
||||
```
|
||||
|
||||
Alternatively, there's [this package](https://aur.archlinux.org/packages/go-task) which installs from the source code instead of downloading the binary from the [releases page](https://github.com/go-task/task/releases):
|
||||
В качестве альтернативы, можно использовать [пакет](https://aur.archlinux.org/packages/go-task), который устанавливается из исходного кода, а не загружает бинарный файл со [страницы релизов](https://github.com/go-task/task/releases):
|
||||
|
||||
```cmd
|
||||
yay -S go-task
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
Этот метод установки находится под управлением сообщества.
|
||||
|
||||
### Fedora
|
||||
|
||||
If you're on Fedora Linux you can install Task from the official [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/) repository using `dnf`:
|
||||
Если вы используете Fedora Linux, вы можете установить Task из официального репозитория [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/), используя `dnf`:
|
||||
|
||||
```cmd
|
||||
sudo dnf install go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available in [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/).
|
||||
Этот метод установки находится под управлением сообщества. После нового релиза Task может потребоваться некоторое время, пока он станет доступен в [Fedora](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/).
|
||||
|
||||
### Nix
|
||||
|
||||
If you're on NixOS or have Nix installed you can install Task from [nixpkgs](https://github.com/NixOS/nixpkgs):
|
||||
Если вы используете NixOS или у вас установлен Nix, вы можете установить Task из [nixpkgs](https://github.com/NixOS/nixpkgs):
|
||||
|
||||
```cmd
|
||||
nix-env -iA nixpkgs.go-task
|
||||
```
|
||||
|
||||
This installation method is community owned. After a new release of Task, it may take some time until it's available in [nixpkgs](https://github.com/NixOS/nixpkgs).
|
||||
Этот метод установки находится под управлением сообщества. После нового релиза Task может потребоваться некоторое время, пока он станет доступен в [nixpkgs](https://github.com/NixOS/nixpkgs).
|
||||
|
||||
### npm
|
||||
|
||||
You can also use Node and npm to install Task by installing [this package](https://www.npmjs.com/package/@go-task/cli).
|
||||
Для установки Task вы также можете использовать Node и npm, установив [этот пакет](https://www.npmjs.com/package/@go-task/cli).
|
||||
|
||||
```bash
|
||||
npm install -g @go-task/cli
|
||||
@@ -99,33 +99,33 @@ npm install -g @go-task/cli
|
||||
|
||||
### Winget
|
||||
|
||||
If you are using Windows and installed the [winget](https://github.com/microsoft/winget-cli) package management tool, you can install Task from [winget-pkgs](https://github.com/microsoft/winget-pkgs).
|
||||
Если вы используете Windows и установили менеджер пакетов [winget](https://github.com/microsoft/winget-cli), вы можете установить Task из [winget-pkgs](https://github.com/microsoft/winget-pkgs).
|
||||
|
||||
```bash
|
||||
winget install Task.Task
|
||||
```
|
||||
|
||||
## Get The Binary
|
||||
## Установка бинарных файлов
|
||||
|
||||
### Binary
|
||||
### Бинарные
|
||||
|
||||
You can download the binary from the [releases page on GitHub][releases] and add to your `$PATH`.
|
||||
Вы можете установить бинарные файлы со [страницы релизов на GitHub][releases] и добавить их в ваш `$PATH`.
|
||||
|
||||
DEB and RPM packages are also available.
|
||||
Также доступны DEB и RPM пакеты.
|
||||
|
||||
The `task_checksums.txt` file contains the SHA-256 checksum for each file.
|
||||
Файл `task_checksums.txt` содержит контрольные суммы SHA-256 для каждого файла.
|
||||
|
||||
### Install Script
|
||||
### Скрипт для установки
|
||||
|
||||
We also have an [install script][installscript] which is very useful in scenarios like CI. Many thanks to [GoDownloader][godownloader] for enabling the easy generation of this script.
|
||||
У нас также есть [скрипт для установки][installscript], который очень полезен в некоторых случаях, таких как CI. Благодарим [GoDownloader][godownloader] за то, что он облегчает генерацию этого скрипта.
|
||||
|
||||
By default, it installs on the `./bin` directory relative to the working directory:
|
||||
По умолчанию он устанавливается в каталог `./bin` относительно рабочего каталога:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
|
||||
```
|
||||
|
||||
It is possible to override the installation directory with the `-b` parameter. On Linux, common choices are `~/.local/bin` and `~/bin` to install for the current user or `/usr/local/bin` to install for all users:
|
||||
Вы можете переопределить каталог установки с помощью параметра `-b`. В Linux распространенными вариантами являются `~/.local/bin` и `~/bin`, чтобы установить для текущего пользователя, или `/usr/local/bin`, чтобы установить для всех пользователей:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
|
||||
@@ -133,13 +133,13 @@ sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
|
||||
|
||||
:::caution
|
||||
|
||||
On macOS and Windows, `~/.local/bin` and `~/bin` are not added to `$PATH` by default.
|
||||
В macOS и Windows, `~/.local/bin` и `~/bin` по умолчанию не добавляются в `$PATH`.
|
||||
|
||||
:::
|
||||
|
||||
### GitHub Actions
|
||||
|
||||
If you want to install Task in GitHub Actions you can try using [this action](https://github.com/arduino/setup-task) by the Arduino team:
|
||||
Если вы хотите установить Task в GitHub Actions, вы можете попробовать использовать [это действие](https://github.com/arduino/setup-task) от команды Arduino:
|
||||
|
||||
```yaml
|
||||
- name: Install Task
|
||||
@@ -149,21 +149,21 @@ If you want to install Task in GitHub Actions you can try using [this action](ht
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
This installation method is community owned.
|
||||
Этот метод установки находится под управлением сообщества.
|
||||
|
||||
## Build From Source
|
||||
## Сборка из исходного кода
|
||||
|
||||
### Go Modules
|
||||
|
||||
Ensure that you have a supported version of [Go][go] properly installed and setup. You can find the minimum required version of Go in the [go.mod](https://github.com/go-task/task/blob/main/go.mod#L3) file.
|
||||
Убедитесь, что у вас правильно установлена и настроена поддерживаемая версия [Go][go]. Вы можете найти минимальную требуемую версию Go в [go.mod](https://github.com/go-task/task/blob/main/go.mod#L3) файле.
|
||||
|
||||
You can then install the latest release globally by running:
|
||||
Затем вы можете установить последнюю версию глобально, запустив:
|
||||
|
||||
```bash
|
||||
go install github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
Or you can install into another directory:
|
||||
Или вы можете установить в другую директорию:
|
||||
|
||||
```bash
|
||||
env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest
|
||||
@@ -171,27 +171,27 @@ env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest
|
||||
|
||||
:::tip
|
||||
|
||||
For CI environments we recommend using the [install script](#install-script) instead, which is faster and more stable, since it'll just download the latest released binary.
|
||||
Для окружения CI мы рекомендуем вместо этого использовать [скрипт установки](#install-script), который быстрее и стабильнее, так как он просто загрузит последний выпущенный бинарный файл.
|
||||
|
||||
:::
|
||||
|
||||
## Setup completions
|
||||
## Завершение установки
|
||||
|
||||
Download the autocompletion file corresponding to your shell.
|
||||
Загрузите файл автодополнения, соответствующий вашей оболочке.
|
||||
|
||||
[All completions are available on the Task repository](https://github.com/go-task/task/tree/main/completion).
|
||||
[Все дополнения доступны в репозитории Task](https://github.com/go-task/task/tree/main/completion).
|
||||
|
||||
### Bash
|
||||
|
||||
First, ensure that you installed bash-completion using your package manager.
|
||||
Сначала убедитесь, что вы установили bash-completion с помощью вашего менеджера пакетов.
|
||||
|
||||
Make the completion file executable:
|
||||
Сделайте файл автодополнения исполняемым:
|
||||
|
||||
```
|
||||
chmod +x path/to/task.bash
|
||||
```
|
||||
|
||||
After, add this to your `~/.bash_profile`:
|
||||
Затем, добавьте это в свой `~/.bash_profile`:
|
||||
|
||||
```shell
|
||||
source path/to/task.bash
|
||||
@@ -199,24 +199,24 @@ source path/to/task.bash
|
||||
|
||||
### ZSH
|
||||
|
||||
Put the `_task` file somewhere in your `$FPATH`:
|
||||
Поместите файл `_task` куда-нибудь в ваш `$FPATH`:
|
||||
|
||||
```shell
|
||||
mv path/to/_task /usr/local/share/zsh/site-functions/_task
|
||||
```
|
||||
|
||||
Ensure that the following is present in your `~/.zshrc`:
|
||||
Убедитесь, что в `~/.zshrc` присутствует следующее:
|
||||
|
||||
```shell
|
||||
autoload -U compinit
|
||||
compinit -i
|
||||
```
|
||||
|
||||
ZSH version 5.7 or later is recommended.
|
||||
Рекомендуется использовать ZSH версии 5.7 или выше.
|
||||
|
||||
### Fish
|
||||
|
||||
Move the `task.fish` completion script:
|
||||
Переместите скрипт автодополнения `task.fish`:
|
||||
|
||||
```shell
|
||||
mv path/to/task.fish ~/.config/fish/completions/task.fish
|
||||
@@ -224,14 +224,14 @@ mv path/to/task.fish ~/.config/fish/completions/task.fish
|
||||
|
||||
### PowerShell
|
||||
|
||||
Open your profile script with:
|
||||
Откройте сценарии вашего профиля с помощью:
|
||||
|
||||
```
|
||||
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
|
||||
notepad $profile
|
||||
```
|
||||
|
||||
Add the line and save the file:
|
||||
Добавьте строку и сохраните файл:
|
||||
|
||||
```shell
|
||||
Invoke-Expression -Command path/to/task.ps1
|
||||
|
||||
@@ -10,11 +10,11 @@ title: Home
|
||||
<img id="logo" src="img/logo.svg" height="250px" width="250px" />
|
||||
</div>
|
||||
|
||||
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, [GNU Make][make].
|
||||
Task - это инструмент для запуска / сборки, который стремится быть простым и удобным в использовании, чем, например, [GNU Make][make].
|
||||
|
||||
Since it's written in [Go][go], Task is just a single binary and has no other dependencies, which means you don't need to mess with any complicated install setups just to use a build tool.
|
||||
Так как Task написан на [Go][go], он представляет собой единственный исполняемый файл и не имеет других зависимостей, что означает, что вам не нужно заниматься сложной настройкой установки просто для использования инструмента сборки.
|
||||
|
||||
Once [installed](installation.md), you just need to describe your build tasks using a simple [YAML][yaml] schema in a file called `Taskfile.yml`:
|
||||
После [установки](installation.md) вам просто нужно описать вашу задачу сборки, используя простую схему [YAML][yaml] в файле с именем `Taskfile.yml`:
|
||||
|
||||
```yaml title="Taskfile.yml"
|
||||
version: '3'
|
||||
@@ -26,18 +26,18 @@ tasks:
|
||||
silent: true
|
||||
```
|
||||
|
||||
And call it by running `task hello` from your terminal.
|
||||
И вызвать ее, запустив `task hello` в вашем терминале.
|
||||
|
||||
The above example is just the start, you can take a look at the [usage](/usage) guide to check the full schema documentation and Task features.
|
||||
Приведенный выше пример - это только начало, вы можете посмотреть на [руководство](/usage) по использованию, чтобы посмотреть полную документацию схемы и функций Task.
|
||||
|
||||
## Features
|
||||
## Особенности
|
||||
|
||||
- [Easy installation](installation.md): just download a single binary, add to `$PATH` and you're done! Or you can also install using [Homebrew][homebrew], [Snapcraft][snapcraft], or [Scoop][scoop] if you want.
|
||||
- Available on CIs: by adding [this simple command](installation.md#install-script) to install on your CI script and you're ready to use Task as part of your CI pipeline;
|
||||
- Truly cross-platform: while most build tools only work well on Linux or macOS, Task also supports Windows thanks to [this shell interpreter for Go][sh].
|
||||
- Great for code generation: you can easily [prevent a task from running](/usage#prevent-unnecessary-work) if a given set of files haven't changed since last run (based either on its timestamp or content).
|
||||
- [Простая установка](installation.md): просто загрузите единственный исполняемый файл, добавьте его в `$PATH` и вы готовы! Или вы можете установить с помощью [Homebrew][homebrew], [Snapcraft][snapcraft] или [Scoop][scoop], если хотите.
|
||||
- Доступен на CI-серверах: просто добавьте [эту простую команду](installation.md#install-script) для установки в CI-скрипт и готово! Теперь можно использовать Task в качестве части вашего CI-пайплайна.
|
||||
- Полностью кроссплатформенный: в то время как большинство инструментов сборки хорошо работают только в Linux или macOS, Task также поддерживает Windows, благодаря [интерпретатору командной оболочки для Go][sh].
|
||||
- Отлично подходит для кодогенерации: вы можете легко [предотвратить запуск задачи](/usage#prevent-unnecessary-work), если необходимый набор файлов не изменился с прошлого запуска (основываясь на времени изменения или содержимом).
|
||||
|
||||
## Gold Sponsors
|
||||
## Золотые спонсоры
|
||||
|
||||
<div class="gold-sponsors">
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ slug: /styleguide/
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Styleguide
|
||||
# Стайлгайд
|
||||
|
||||
This is the official Task styleguide for `Taskfile.yml` files. This guide contains some basic instructions to keep your Taskfile clean and familiar to other users.
|
||||
Это официальный стайлгайд Task для `Taskfile.yml` файлов. Это руководство содержит некоторые базовые инструкции для того, чтобы ваш Taskfile был чистым и понятен другим пользователям.
|
||||
|
||||
This contains general guidelines, but they don't necessarily need to be strictly followed. Feel free to disagree and proceed differently at some point if you need or want to. Also, feel free to open issues or pull requests with improvements to this guide.
|
||||
Этот стайлгайд содержит общие рекомендации по написанию кода, но не обязательно требует их строгого соблюдения. Можете не соглашаться с правилами и использовать другой подход, если вам это нужно или хотите это сделать. Кроме того, не стесняйтесь создавать Issue или PR с улучшениями этого гида.
|
||||
|
||||
## Use `Taskfile.yml` and not `taskfile.yml`
|
||||
## Используйте `Taskfile.yml` вместо `taskfile.yml`
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -20,20 +20,20 @@ taskfile.yml
|
||||
Taskfile.yml
|
||||
```
|
||||
|
||||
This is important especially for Linux users. Windows and macOS have case insensitive filesystems, so `taskfile.yml` will end up working, even that not officially supported. On Linux, only `Taskfile.yml` will work, though.
|
||||
Это особенно важно для пользователей Linux. У Windows и macOS нечувствительные файловые системы, поэтому `taskfile.yml` в конечном итоге будет работать, даже если официально не поддерживается. В Linux только будет работать `Taskfile.yml`.
|
||||
|
||||
## Use the correct order of keywords
|
||||
## Используйте правильный порядок ключевых слов
|
||||
|
||||
- `version:`
|
||||
- `includes:`
|
||||
- Configuration ones, like `output:`, `silent:`, `method:` and `run:`
|
||||
- Конфигурационные параметры, такие как `output:`, `silent:`, `method:` и `run:`
|
||||
- `vars:`
|
||||
- `env:`, `dotenv:`
|
||||
- `tasks:`
|
||||
|
||||
## Use 2 spaces for indentation
|
||||
## Используйте 2 пробела для отступа
|
||||
|
||||
This is the most common convention for YAML files, and Task follows it.
|
||||
Это наиболее распространенное соглашение для YAML-файлов, и Task следует ему.
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -50,7 +50,7 @@ tasks:
|
||||
- echo 'foo'
|
||||
```
|
||||
|
||||
## Separate with spaces the mains sections
|
||||
## Разделяйте основные секции пробелами
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -84,7 +84,7 @@ tasks:
|
||||
# ...
|
||||
```
|
||||
|
||||
## Add spaces between tasks
|
||||
## Добавляйте пробелы между задачами
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -119,7 +119,7 @@ tasks:
|
||||
- echo 'baz'
|
||||
```
|
||||
|
||||
## Use upper-case variable names
|
||||
## Используйте имена переменных в верхнем регистре
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -146,7 +146,7 @@ tasks:
|
||||
- go build -o {{.BINARY_NAME}} .
|
||||
```
|
||||
|
||||
## Don't wrap vars in spaces when templating
|
||||
## Не заключайте переменные в пробелы при использовании их в шаблонах
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -167,9 +167,9 @@ tasks:
|
||||
- echo '{{.MESSAGE}}'
|
||||
```
|
||||
|
||||
This convention is also used by most people for any Go templating.
|
||||
Большинство людей использует это соглашение и для любых шаблонов в Go.
|
||||
|
||||
## Separate task name words with a dash
|
||||
## Разделяйте слова в названии задач дефисом
|
||||
|
||||
```yaml
|
||||
# bad
|
||||
@@ -190,7 +190,7 @@ tasks:
|
||||
- echo 'Do something'
|
||||
```
|
||||
|
||||
## Use colon for task namespacing
|
||||
## Используйте двоеточие для неймспейсов в названиях задач
|
||||
|
||||
```yaml
|
||||
# good
|
||||
@@ -206,4 +206,4 @@ tasks:
|
||||
- docker-compose ...
|
||||
```
|
||||
|
||||
This is also done automatically when using included Taskfiles.
|
||||
Это также происходит автоматически при использовании включенных Taskfiles.
|
||||
|
||||
@@ -3,21 +3,21 @@ slug: /taskfile-versions/
|
||||
sidebar_position: 12
|
||||
---
|
||||
|
||||
# Taskfile Versions
|
||||
# Версии Taskfile
|
||||
|
||||
The Taskfile syntax and features changed with time. This document explains what changed on each version and how to upgrade your Taskfile.
|
||||
Синтаксис Taskfile и функции со временем изменяются. Этот документ объясняет, что изменилось в каждой версии и как обновить свой Taskfile.
|
||||
|
||||
## What the Taskfile version mean
|
||||
## Что обозначает версия Taskfile
|
||||
|
||||
The Taskfile version follows the Task version. E.g. the change to Taskfile version `2` means that Task `v2.0.0` should be release to support it.
|
||||
Версия Taskfile соответствует версии Task. Например: изменение на Taskfile версии `2` означает, что Task `v2.0.0` должна быть выпущена для ее поддержки.
|
||||
|
||||
The `version:` key on Taskfile accepts a semver string, so either `2`, `2.0` or `2.0.0` is accepted. If you choose to use `2.0` Task will not enable future `2.1` features, but if you choose to use `2`, then any `2.x.x` features will be available, but not `3.0.0+`.
|
||||
`version:` ключ Taskfile принимает [semVer](https://semver.org/lang/ru/) строку. Пример: `2`, `2.0` или `2.0.0`. Если вы решите использовать Task версии `2.0`, то у вас не будет доступа к функциям версии `2.1`, но если вы решите использовать версию `2`, то любые функции версий `2.x.x` будут доступны, но не `3.0.0+`.
|
||||
|
||||
## Version 1
|
||||
## Версия 1
|
||||
|
||||
> NOTE: Taskfiles in version 1 are not supported on Task >= v3.0.0 anymore.
|
||||
> ПРИМЕЧАНИЕ: Taskfiles версии 1 больше не поддерживаются в версии Task >= v3.0.0.
|
||||
|
||||
In the first version of the `Taskfile`, the `version:` key was not available, because the tasks was in the root of the YAML document. Like this:
|
||||
В первой версии `Taskfile` поле `version:` не доступно, потому что задачи были в корне документа YAML. Пример:
|
||||
|
||||
```yaml
|
||||
echo:
|
||||
@@ -25,16 +25,16 @@ echo:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
The variable priority order was also different:
|
||||
Порядок приоритетов переменных также отличается:
|
||||
|
||||
1. Call variables
|
||||
2. Environment
|
||||
3. Task variables
|
||||
4. `Taskvars.yml` variables
|
||||
1. Вызов переменных
|
||||
2. Переменные среды
|
||||
3. Переменные Task
|
||||
4. Переменные `Taskvars.yml`
|
||||
|
||||
## Version 2.0
|
||||
## Версия 2.0
|
||||
|
||||
At version 2, we introduced the `version:` key, to allow us to evolve Task with new features without breaking existing Taskfiles. The new syntax is as follows:
|
||||
В версии 2 был добавлен ключ `version: `. Он позволяет выпускать обновления сохраняя обратную совместимость. Пример использования:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -45,7 +45,7 @@ tasks:
|
||||
- echo "Hello, World!"
|
||||
```
|
||||
|
||||
Version 2 allows you to write global variables directly in the Taskfile, if you don't want to create a `Taskvars.yml`:
|
||||
Версия 2 позволяет создавать глобальные переменные непосредственно в Taskfile, если вы не хотите создавать `Taskvars.yml`:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -59,15 +59,15 @@ tasks:
|
||||
- echo "{{.GREETING}}"
|
||||
```
|
||||
|
||||
The variable priority order changed to the following:
|
||||
Порядок приоритетов переменных также отличается:
|
||||
|
||||
1. Task variables
|
||||
1. Переменные Task
|
||||
2. Call variables
|
||||
3. Taskfile variables
|
||||
4. Taskvars file variables
|
||||
5. Environment variables
|
||||
3. Переменные Taskfile
|
||||
4. Переменные `Taskvars.yml`
|
||||
5. Переменные окружения
|
||||
|
||||
A new global option was added to configure the number of variables expansions (which default to 2):
|
||||
Добавлена новая глобальная опция для настройки количества расширений переменных (по умолчанию 2):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -87,9 +87,9 @@ tasks:
|
||||
- echo "{{.FOOBARBAZ}}"
|
||||
```
|
||||
|
||||
## Version 2.1
|
||||
## Версия 2.1
|
||||
|
||||
Version 2.1 includes a global `output` option, to allow having more control over how commands output are printed to the console (see [documentation][output] for more info):
|
||||
В версии 2.1 появилась глобальная опция `output`, которая позволяет иметь больше контроля над тем, как вывод команд печатается на консоли (см. [документацию][output]):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -103,7 +103,7 @@ tasks:
|
||||
prefix: server
|
||||
```
|
||||
|
||||
From this version it's also possible to ignore errors of a command or task (check documentation [here][ignore_errors]):
|
||||
Начиная с этой версии можно игнорировать ошибки команды или задачи (смотрите документацию [здесь][ignore_errors]):
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -122,9 +122,9 @@ tasks:
|
||||
ignore_error: true
|
||||
```
|
||||
|
||||
## Version 2.2
|
||||
## Версия 2.2
|
||||
|
||||
Version 2.2 comes with a global `includes` options to include other Taskfiles:
|
||||
В Версии 2.2 появилась новая глобальная опция `includes`, которая позволяет импортировать другие Taskfile'ы:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -134,9 +134,9 @@ includes:
|
||||
docker: ./DockerTasks.yml
|
||||
```
|
||||
|
||||
## Version 2.6
|
||||
## Версия 2.6
|
||||
|
||||
Version 2.6 comes with `preconditions` stanza in tasks.
|
||||
Версия 2.6 поставляется с `preconditions` опцией в задачах.
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -149,20 +149,20 @@ tasks:
|
||||
- aws s3 cp .env s3://myenvironment
|
||||
```
|
||||
|
||||
Please check the [documentation][includes]
|
||||
Пожалуйста, проверьте [документацию][includes]
|
||||
|
||||
## Version 3
|
||||
## Версия 3
|
||||
|
||||
These are some major changes done on `v3`:
|
||||
Основные изменения, сделанные в `v3`:
|
||||
|
||||
- Task's output will now be colored
|
||||
- Added support for `.env` like files
|
||||
- Added `label:` setting to task so one can override how the task name appear in the logs
|
||||
- A global `method:` was added to allow setting the default method, and Task's default changed to `checksum`
|
||||
- Two magic variables were added when using `status:`: `CHECKSUM` and `TIMESTAMP` which contains, respectively, the md5 checksum and greatest modification timestamp of the files listed on `sources:`
|
||||
- Also, the `TASK` variable is always available with the current task name
|
||||
- CLI variables are always treated as global variables
|
||||
- Added `dir:` option to `includes` to allow choosing on which directory an included Taskfile will run:
|
||||
- Output задачи теперь цветной
|
||||
- Добавлена поддержка `.env` файлов
|
||||
- Добавлен параметр `label:`. Появилась возможность переопределить имя задачи в логах
|
||||
- Глобальный параметр `method:` был добавлен для установки метода по умолчанию, а задача по умолчанию изменена на `checksum`
|
||||
- Добавлены 2 магические переменные, используемые в функции `status:` - `CHECKSUM` и `TIMESTAMP`, которые содержат, контрольную сумму md5 и наибольшую отметку времени изменения файлов, перечисленных в `sources:`
|
||||
- Кроме того, переменная `TASK` всегда доступна по имени текущей задачи
|
||||
- Переменные CLI всегда считаются глобальными переменными
|
||||
- Добавлена опция `dir:` в `includes` для того, чтобы выбрать, в каком каталоге Taskfile будет запущен:
|
||||
|
||||
```yaml
|
||||
includes:
|
||||
@@ -171,7 +171,7 @@ includes:
|
||||
dir: ./docs
|
||||
```
|
||||
|
||||
- Implemented short task syntax. All below syntaxes are equivalent:
|
||||
- Реализован короткий синтаксис задачи. Все синтаксисы ниже эквивалентны:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -197,11 +197,11 @@ tasks:
|
||||
print: echo "Hello, World!"
|
||||
```
|
||||
|
||||
- There was a major refactor on how variables are handled. They're now easier to understand. The `expansions:` setting was removed as it became unncessary. This is the order in which Task will process variables, each level can see the variables set by the previous one and override those.
|
||||
- Environment variables
|
||||
- Global + CLI variables
|
||||
- Был произведён большой рефакторинг обработки переменных. Теперь всё стало более прозрачно. Параметр `expansions:` был удален. Это порядок, в котором Task будет обрабатывать переменные, каждый уровень может видеть переменные, объявленные на предыдущем и переопределять их.
|
||||
- Переменные окружения
|
||||
- Глобальные + CLI переменные
|
||||
- Call variables
|
||||
- Task variables
|
||||
- Переменные Task
|
||||
|
||||
[output]: usage.md#output-syntax
|
||||
[ignore_errors]: usage.md#ignore-errors
|
||||
|
||||
@@ -3,13 +3,13 @@ slug: /translate/
|
||||
sidebar_position: 14
|
||||
---
|
||||
|
||||
# Translate
|
||||
# Перевод
|
||||
|
||||
Want to help us translate this documentation? In this document we explain how.
|
||||
Хотите помочь нам перевести эту документацию? В этом документе мы объясним каким образом.
|
||||
|
||||
Do NOT edit translated markdown files directly on the GitHub repository! We use [Crowdin][crowdin] to allow contributors on work on translations. The repository is periodically updated with progress from Crowdin.
|
||||
НЕ редактируйте переведенные файлы markdown прямо в репозитории GitHub! Мы используем [Crowdin][crowdin], чтобы позволить участникам работать над переводами. Репозиторий периодически обновляется с прогрессом из Crowdin.
|
||||
|
||||
If you want to have access to the Crowdin project to be able to suggest translations, please ask for access on the [#translations channel on our Discord server][discord]. If a given language is not being shown to Crowdin yet, just ask and we can configure it.
|
||||
Если вы хотите получить доступ к проекту Crowdin, чтобы предложить перевод, пожалуйста, попросите доступ к каналу [#translations на нашем Discord сервере][discord]. Если данный язык еще не отображается в Crowdin, просто спросите и мы сможем его настроить.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ slug: /usage/
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Usage
|
||||
# Использование
|
||||
|
||||
## Getting started
|
||||
## Начало работы
|
||||
|
||||
Create a file called `Taskfile.yml` in the root of your project. The `cmds` attribute should contain the commands of a task. The example below allows compiling a Go app and uses [esbuild](https://esbuild.github.io/) to concat and minify multiple CSS files into a single one.
|
||||
Создайте файл с именем `Taskfile.yml` в корне вашего проекта. Атрибут `cmds` должен содержать команды задачи. Пример ниже позволяет скомпилировать приложение Go и использовать [esbuild](https://esbuild.github.io/) чтобы собрать и минимизировать несколько CSS файлов в один.
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -22,32 +22,32 @@ tasks:
|
||||
- esbuild --bundle --minify css/index.css > public/bundle.css
|
||||
```
|
||||
|
||||
Running the tasks is as simple as running:
|
||||
Запуск задач настолько прост, что достаточно выполнить команду:
|
||||
|
||||
```bash
|
||||
task assets build
|
||||
```
|
||||
|
||||
Task uses [mvdan.cc/sh](https://mvdan.cc/sh/), a native Go sh interpreter. So you can write sh/bash commands, and it will work even on Windows, where `sh` or `bash` are usually not available. Just remember any executable called must be available by the OS or in PATH.
|
||||
Task использует [mvdan.cc/sh](https://mvdan.cc/sh/) - нативный интерпретатор sh на Go. Таким образом, вы можете писать команды sh / bash, и они будут работать даже в Windows, где обычно не доступны `sh` или `bash`. Просто помните, что любой исполняемый файл, который вызывается, должен быть доступен ОС или находиться в переменной PATH.
|
||||
|
||||
If you omit a task name, "default" will be assumed.
|
||||
Если вы опустите имя задачи, то будет использоваться имя "default".
|
||||
|
||||
## Supported file names
|
||||
## Поддерживаемые названия файлов
|
||||
|
||||
Task will look for the following file names, in order of priority:
|
||||
Task будет искать следующие файлы, в порядке приоритета:
|
||||
|
||||
- Taskfile.yml
|
||||
- Taskfile.yaml
|
||||
- Taskfile.dist.yml
|
||||
- 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`).
|
||||
Идея создания вариантов `.dist` заключается в том, чтобы позволить проектам иметь одну фиксированную версию (`.dist`), при этом позволяя отдельным пользователям переопределить Taskfile, добавив дополнительный `Taskfile.yml` (который будет находится в `.gitignore`).
|
||||
|
||||
### Running a Taskfile from a subdirectory
|
||||
### Запуск Taskfile из поддиректории
|
||||
|
||||
If a Taskfile cannot be found in the current working directory, it will walk up the file tree until it finds one (similar to how `git` works). When running Task from a subdirectory like this, it will behave as if you ran it from the directory containing the Taskfile.
|
||||
Если Taskfile не найден в текущем рабочем каталоге, он будет искать его вверх по дереву файлов, пока не найдет его (похоже на то, как работает `git`). При запуске Task из подкаталога, он будет работать так, как будто вы запустили его из каталога, содержащего Taskfile.
|
||||
|
||||
You can use this functionality along with the special `{{.USER_WORKING_DIR}}` variable to create some very useful reusable tasks. For example, if you have a monorepo with directories for each microservice, you can `cd` into a microservice directory and run a task command to bring it up without having to create multiple tasks or Taskfiles with identical content. For example:
|
||||
Вы можете использовать эту функцию вместе со специальной переменной `{{.USER_WORKING_DIR}}`, чтобы создавать переиспользуемые задачи. Например, если у вас есть монорепозиторий с каталогами для каждого микросервиса, вы можете `cd` в директорию микросервиса и запустить команду задачи, без создания нескольких задач или Taskfile с идентичным содержимым. Например:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -61,19 +61,19 @@ tasks:
|
||||
- docker-compose up -d
|
||||
```
|
||||
|
||||
In this example, we can run `cd <service>` and `task up` and as long as the `<service>` directory contains a `docker-compose.yml`, the Docker composition will be brought up.
|
||||
В этом примере мы можем выполнить `cd <service>` и `task up`, и при условии, что каталог `<service>` содержит файл `docker-compose.yml`, Docker composition будет запущен.
|
||||
|
||||
### Running a global Taskfile
|
||||
### Запуск глобального 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.
|
||||
Если вы вызовите Task с помощью флага `--global` (псевдоним `-g`), будет искать ваш домашний каталог вместо рабочего каталога. Проще говоря, Task будет искать в `$HOME/Taskfile.yml` или `$HOME/Taskfile.yaml`.
|
||||
|
||||
This is useful to have automation that you can run from anywhere in your system!
|
||||
Это полезно, чтобы иметь автоматизацию, которую можно запустить из любого места вашей системы!
|
||||
|
||||
:::info
|
||||
|
||||
When running your global Taskfile with `-g`, tasks will run on `$HOME` by default, and not on your working directory!
|
||||
Когда вы запускаете ваш глобальный Taskfile с помощью `-g`, task будут выполняться по умолчанию в директории `$HOME`, а не в вашей рабочей директории!
|
||||
|
||||
As mentioned in the previous section, the `{{.USER_WORKING_DIR}}` special variable can be very handy here to run stuff on the directory you're calling `task -g` from.
|
||||
Как упоминалось в предыдущем разделе, специальная переменная `{{.USER_WORKING_DIR}}` может быть очень полезной для запуска команд в директории, из которой вы вызываете `task -g`.
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -91,11 +91,11 @@ tasks:
|
||||
|
||||
:::
|
||||
|
||||
## Environment variables
|
||||
## Переменные среды
|
||||
|
||||
### Task
|
||||
|
||||
You can use `env` to set custom environment variables for a specific task:
|
||||
Вы можете использовать `env` для создания своих переменных среды для конкретной task:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -108,7 +108,7 @@ tasks:
|
||||
GREETING: Hey, there!
|
||||
```
|
||||
|
||||
Additionally, you can set global environment variables that will be available to all tasks:
|
||||
Также, вы можете создавать глобальные переменные окружения, которые будут доступны всем task:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -124,13 +124,13 @@ tasks:
|
||||
|
||||
:::info
|
||||
|
||||
`env` supports expansion and retrieving output from a shell command just like variables, as you can see in the [Variables](#variables) section.
|
||||
`env` поддерживает дополнение и извлечение вывода из команды shell или переменной, вы можете посмотреть в разделе [Переменные](#variables).
|
||||
|
||||
:::
|
||||
|
||||
### .env files
|
||||
### .env файлы
|
||||
|
||||
You can also ask Task to include `.env` like files by using the `dotenv:` setting:
|
||||
Вы также можете попросить Task включать файлы, подобные `.env` используя настройку `dotenv:`:
|
||||
|
||||
```bash title=".env"
|
||||
KEYNAME=VALUE
|
||||
@@ -154,7 +154,7 @@ tasks:
|
||||
- echo "Using $KEYNAME and endpoint $ENDPOINT"
|
||||
```
|
||||
|
||||
Dotenv files can also be specified at the task level:
|
||||
Dotenv файлы также могут быть указаны на уровне task:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -169,7 +169,7 @@ tasks:
|
||||
- echo "Using $KEYNAME and endpoint $ENDPOINT"
|
||||
```
|
||||
|
||||
Environment variables specified explicitly at the task-level will override variables defined in dotfiles:
|
||||
Переменные окружения, определенные на уровне task, заменят переменные объявленные в dotenv файлах:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -188,13 +188,13 @@ tasks:
|
||||
|
||||
:::info
|
||||
|
||||
Please note that you are not currently able to use the `dotenv` key inside included Taskfiles.
|
||||
Обратите внимание, в данный момент вы не можете использовать ключ `dotenv` во вложенных Taskfile.
|
||||
|
||||
:::
|
||||
|
||||
## Including other Taskfiles
|
||||
## Включение других Taskfile
|
||||
|
||||
If you want to share tasks between different projects (Taskfiles), you can use the importing mechanism to include other Taskfiles using the `includes` keyword:
|
||||
Если вы хотите использовать task в других проектах (Taskfile), вы можете использовать механизм импорта для включения других Taskfile используя ключевое слово `includes`:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -204,9 +204,9 @@ includes:
|
||||
docker: ./DockerTasks.yml
|
||||
```
|
||||
|
||||
The tasks described in the given Taskfiles will be available with the informed namespace. So, you'd call `task docs:serve` to run the `serve` task from `documentation/Taskfile.yml` or `task docker:build` to run the `build` task from the `DockerTasks.yml` file.
|
||||
Task, описанные в указанных Taskfile, будут доступны с указанным пространством имен. Таким образом, вы можете запустить `serve` task из файла `documentation/Taskfile.yml` с помощью команды `task docs:serve`, или запустить `build` task из файла `DockerTasks.yml` с помощью команды `task docker:build`.
|
||||
|
||||
Relative paths are resolved relative to the directory containing the including Taskfile.
|
||||
Относительные пути разрешаются относительно каталога, содержащего включающий Taskfile.
|
||||
|
||||
### OS-specific Taskfiles
|
||||
|
||||
@@ -480,9 +480,9 @@ tasks:
|
||||
- cmd: echo 'Running on all platforms'
|
||||
```
|
||||
|
||||
## Calling another task
|
||||
## Вызов другой task
|
||||
|
||||
When a task has many dependencies, they are executed concurrently. This will often result in a faster build pipeline. However, in some situations, you may need to call other tasks serially. In this case, use the following syntax:
|
||||
Когда task имеет много зависимостей, они выполняются параллельно. Это частно приводит к более быстрому построению пайплайна. Однако, в некоторых ситуациях вам может понадобиться вызвать другие task последовательно. В этом случае используйте следующий синтаксис:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -503,7 +503,7 @@ tasks:
|
||||
- echo "Another task"
|
||||
```
|
||||
|
||||
Overriding variables in the called task is as simple as informing `vars` attribute:
|
||||
Переопределение переменных в вызываемой task делается через указание атрибута `vars`:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -521,7 +521,7 @@ tasks:
|
||||
vars: { RECIPIENT: 'Cruel World' }
|
||||
```
|
||||
|
||||
The above syntax is also supported in `deps`.
|
||||
Указанный выше синтаксис также поддерживается в `deps`.
|
||||
|
||||
:::tip
|
||||
|
||||
|
||||
Reference in New Issue
Block a user