Skip to content

Commit

Permalink
chore: sync translations (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
task-bot authored Jun 11, 2023
1 parent 5af361a commit 127b685
Show file tree
Hide file tree
Showing 70 changed files with 1,861 additions and 546 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ If `--` is given, all remaning arguments will be assigned to a special `CLI_ARGS
| | `--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. |
| `-y` | `--yes` | `bool` | `false` | Assume "yes" as answer to all prompts. |
| | `--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` | |
Expand Down Expand Up @@ -72,18 +73,21 @@ A full list of the exit codes and their descriptions can be found below:
| 202 | The user tried to invoke a task that is internal |
| 203 | There a multiple tasks with the same name or alias |
| 204 | A task was called too many times |
| 205 | A task was cancelled by the user |

These codes can also be found in the repository in [`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.

:::

## JSON Output

When using the `--json` flag in combination with either the `--list` or `--list-all` flags, the output will be a JSON object with the following structure:

```jsonc
```json
{
"tasks": [
{
Expand Down Expand Up @@ -202,6 +206,7 @@ vars:
| `deps` | [`[]Dependency`](#dependency) | | A list of dependencies of this task. Tasks defined here will run in parallel before this task. |
| `label` | `string` | | Overrides the name of the task in the output when a task is run. Supports variables. |
| `desc` | `string` | | A short description of the task. This is displayed when calling `task --list`. |
| `prompt` | `string` | | A prompt that will be presented before a task is run. Declining will cancel running the current and any subsequent tasks. |
| `summary` | `string` | | A longer description of the task. This is displayed when calling `task --summary [task]`. |
| `aliases` | `[]string` | | A list of alternative names by which the task can be called. |
| `sources` | `[]string` | | A list of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /changelog/
sidebar_position: 8
sidebar_position: 9
---

# Changelog
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /community/
sidebar_position: 9
sidebar_position: 10
---

# Community
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /contributing/
sidebar_position: 10
sidebar_position: 11
---

# Contributing
Expand All @@ -17,6 +17,7 @@ This document applies to the core [Task][task] repository _and_ [Task for Visual

- **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.
- **Experiments** - If there is no way to make your change backward compatible then there is a procedure to introduce breaking changes into minor versions. We call these "\[experiments\]\[experiments\]". If you're intending to work on an experiment, then please read the \[experiments workflow\]\[experiments-workflow\] document carefully and submit a proposal first.

## 1. Setup

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /donate/
sidebar_position: 13
sidebar_position: 15
---

# Donate
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
slug: /experiments/
sidebar_position: 5
---

# Experiments

:::caution

All experimental features are subject to breaking changes and/or removal _at any time_. We strongly recommend that you do not use these features in a production environment. They are intended for testing and feedback only.

:::

In order to allow Task to evolve quickly, we roll out breaking changes to minor versions behind experimental flags. This allows us to gather feedback on breaking changes before committing to a major release. This document describes the current set of experimental features and the deprecated feature that they are intended to replace.

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.

Flags will always override environment variables.

## Current Experimental Features and Deprecations

Each section below details an experiment or deprecation and explains what the flags/environment variables to enable the experiment are and how the feature's behavior will change. It will also explain what you need to do to migrate any existing Taskfiles to the new behavior.

<!-- EXPERIMENT TEMPLATE - Include sections as necessary...
### ![experiment] <Feature> ([#{issue}](https://github.com/go-task/task/issues/{issue})), ...)
- Flag to enable: `--x-{feature}`
- Env to enable: `TASK_X_{feature}`
- Deprecates: {list any existing functionality that will be deprecated by this experiment}
{Short description of the feature}
{Short explanation of how users should migrate to the new behavior}
-->

### ![deprecated][] Version 2 Schema ([#1197][deprecate-version-2-schema])

The Taskfile v2 schema was introduced in March 2018 and replaced by version 3 in August the following year. Users have had a long time to update and so we feel that it is time to tidy up the codebase and focus on new functionality instead.

This notice does not mean that we are immediately removing support for version 2 schemas. However, support will not be extended to future major releases and we _strongly recommend_ that anybody still using a version 2 schema upgrades to version 3 as soon as possible.

A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][version-3-release-notes].

<!-- 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
slug: /experiments/workflow/
---

# Workflow

Experiments are a way for us to test out new features in Task before committing to them in a major release. Because this concept is built around the idea of feedback from our community, we have built a workflow for the process of introducing these changes. This ensures that experiments are given the attention and time that they need and that we are getting the best possible results out of them.

The sections below describe the various stages that an experiment must go through from its proposal all the way to being released in a major version of Task.

## 1. Proposal

All experimental features start with a proposal in the form of a GitHub issue. If the maintainers decide that an issue has enough support and is a breaking change or is complex/controversial enough to require user feedback, then the issue will be marked with the ![proposal][] label. At this point, the issue becomes a proposal and a period of consultation begins. During this period, we request that users provide feedback on the proposal and how it might effect their use of Task. It is up to the discretion of the maintainers to decide how long this period lasts.

## 2. Draft

Once a proposal's consultation ends, a contributor may pick up the work and begin the initial implementation. Once a PR is opened, the maintainers will ensure that it meets the requirements for an experimental feature (i.e. flags are in the right format etc) and merge the feature. Once this code is released, the status will be updated via the ![draft][] label. This indicates that an implementation is now available for use in a release and the experiment is open for feedback.

:::note

During the draft period, major changes to the implementation may be made based on the feedback received from users. There are _no stability guarantees_ and experimental features may be abandoned _at any time_.

:::

## 3. Candidate

Once an acceptable level of consensus has been reached by the community and feedback/changes are less frequent/significant, the status may be updated via the ![candidate][] label. This indicates that a proposal is _likely_ to accepted and will enter a period for final comments and minor changes.

## 4. Stable

Once a suitable amount of time has passed with no changes or feedback, an experiment will be given the ![stable][] label. At this point, the functionality will be treated like any other feature in Task and any changes _must_ be backward compatible. This allows users to migrate to the new functionality without having to worry about anything breaking in future releases. This provides the best experience for users migrating to a new major version.

## 5. Released

When making a new major release of Task, all experiments marked as ![stable][] will move to ![released][] and their behaviors will become the new default in Task. Experiments in an earlier stage (i.e. not stable) cannot be released and so will continue to be experiments in the new version.

## Abandoned / Superseded

If an experiment is unsuccessful at any point then it will be given the ![abandoned][] or ![superseded][] labels depending on which is more suitable. These experiments will be removed from Task.

<!-- prettier-ignore-start -->

<!-- prettier-ignore-end -->
[proposal]: https://img.shields.io/badge/experiment:%20proposal-purple
[draft]: https://img.shields.io/badge/experiment:%20draft-purple
[candidate]: https://img.shields.io/badge/experiment:%20candidate-purple
[stable]: https://img.shields.io/badge/experiment:%20stable-purple
[released]: https://img.shields.io/badge/experiment:%20released-purple
[abandoned]: https://img.shields.io/badge/experiment:%20abandoned-purple
[superseded]: https://img.shields.io/badge/experiment:%20superseded-purple
51 changes: 47 additions & 4 deletions docs/i18n/es-ES/docusaurus-plugin-content-docs/current/faq.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
---
slug: /faq/
sidebar_position: 6
sidebar_position: 7
---

# FAQ

This page contains a list of frequently asked questions about Task.

- [Why won't my task update my shell environment?](#why-wont-my-task-update-my-shell-environment)
- ['x' builtin command doesn't work on Windows](#x-builtin-command-doesnt-work-on-windows)

## Why won't my task update my shell environment?

This is a limitation of how shells work. Task runs as a subprocess of your current shell, so it can't change the environment of the shell that started it. This limitation is shared by other task runners and build tools too.
Expand All @@ -25,6 +22,52 @@ my-shell-env:
Now run `eval $(task my-shell-env)` and the variables `$FOO` and `$BAR` will be available in your shell.

## I can't reuse my shell in a task's commands

Task runs each command as a separate shell process, so something you do in one command won't effect any future commands. For example, this won't work:

```yaml
version: '3'
tasks:
foo:
cmds:
- a=foo
- echo $a
# outputs ""
```

To work around this you can either use a multiline command:

```yaml
version: '3'
tasks:
foo:
cmds:
- |
a=foo
echo $a
# outputs "foo"
```

Or for more complex multi-line commands it is recommended to move your code into a separate file and call that instead:

```yaml
version: '3'
tasks:
foo:
cmds:
- ./foo-printer.bash
```

```bash
#!/bin/bash
a=foo
echo $a
```

## 'x' builtin command doesn't work on Windows

The default shell on Windows (`cmd` and `powershell`) do not have commands like `rm` and `cp` available as builtins. This means that these commands won't work. If you want to make your Taskfile fully cross-platform, you'll need to work around this limitation using one of the following methods:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /integrations/
sidebar_position: 5
sidebar_position: 6
---

# Integrations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /releasing/
sidebar_position: 11
sidebar_position: 13
---

# Releasing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /styleguide/
sidebar_position: 7
sidebar_position: 8
---

# Styleguide
Expand Down Expand Up @@ -207,3 +207,27 @@ tasks:
```
This is also done automatically when using included Taskfiles.
## Prefer external scripts over complex multi-line commands
```yaml
# bad
version: '3'

tasks:
build:
cmds:
- |
for i in $(seq 1 10); do
echo $i
echo "some other complex logic"
done'
# good
version: '3'

tasks:
build:
cmds:
- ./scripts/my_complex_script.sh
```
Loading

0 comments on commit 127b685

Please sign in to comment.