-
-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
383 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
website/versioned_docs/version-latest/deprecations/completion_scripts.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
slug: /deprecations/completion-scripts/ | ||
--- | ||
|
||
# Completion Scripts | ||
|
||
:::warning | ||
|
||
This deprecation breaks the following functionality: | ||
|
||
- Any direct references to the completion scripts in the Task git repository | ||
|
||
::: | ||
|
||
Direct use of the completion scripts in the `completion/*` directory of the | ||
[github.com/go-task/task][task] Git repository is deprecated. Any shell | ||
configuration that directly refers to these scripts will potentially break in | ||
the future as the scripts may be moved or deleted entirely. Any configuration | ||
should be updated to use the [new method for generating shell | ||
completions][completions] instead. | ||
|
||
{/* prettier-ignore-start */} | ||
[completions]: ../installation.mdx#setup-completions | ||
[task]: https://github.com/go-task/task | ||
{/* prettier-ignore-end */} |
74 changes: 74 additions & 0 deletions
74
website/versioned_docs/version-latest/experiments/env_precedence.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
slug: '/experiments/env-precedence' | ||
--- | ||
|
||
# Env Precedence (#1038) | ||
|
||
:::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. | ||
|
||
::: | ||
|
||
:::warning | ||
|
||
This experiment breaks the following functionality: | ||
|
||
- environment variable will take precedence over OS environment variables | ||
|
||
::: | ||
|
||
:::info | ||
|
||
To enable this experiment, set the environment variable: | ||
`TASK_X_ENV_PRECEDENCE=1`. Check out [our guide to enabling | ||
experiments][enabling-experiments] for more information. | ||
|
||
::: | ||
|
||
Before this experiment, the OS variable took precedence over the task | ||
environment variable. This experiment changes the precedence to make the task | ||
environment variable take precedence over the OS variable. | ||
|
||
Consider the following example: | ||
|
||
```yml | ||
version: '3' | ||
|
||
tasks: | ||
default: | ||
env: | ||
KEY: 'other' | ||
cmds: | ||
- echo "$KEY" | ||
``` | ||
Running `KEY=some task` before this experiment, the output would be `some`, but | ||
after this experiment, the output would be `other`. | ||
|
||
If you still want to get the OS variable, you can use the template function env | ||
like follow : `{{env "OS_VAR"}}`. | ||
|
||
```yml | ||
version: '3' | ||
tasks: | ||
default: | ||
env: | ||
KEY: 'other' | ||
cmds: | ||
- echo "$KEY" | ||
- echo {{env "KEY"}} | ||
``` | ||
Running `KEY=some task`, the output would be `other` and `some`. | ||
|
||
Like other variables/envs, you can also fall back to a given value using the | ||
default template function: | ||
```yml | ||
MY_ENV: '{{.MY_ENV | default "fallback"}}' | ||
``` | ||
|
||
{/* prettier-ignore-start */} | ||
[enabling-experiments]: ./experiments.mdx#enabling-experiments | ||
{/* prettier-ignore-end */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.