mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
docs: fix YAML syntax errors in schema and guide documentation (#2500)
This commit is contained in:
@@ -406,7 +406,8 @@ option takes the list of tasks to be excluded from this include.
|
|||||||
|
|
||||||
```yaml [Taskfile.yml]
|
```yaml [Taskfile.yml]
|
||||||
version: '3'
|
version: '3'
|
||||||
includes:
|
|
||||||
|
includes:
|
||||||
included:
|
included:
|
||||||
taskfile: ./Included.yml
|
taskfile: ./Included.yml
|
||||||
excludes: [foo]
|
excludes: [foo]
|
||||||
@@ -926,7 +927,7 @@ tasks:
|
|||||||
- ./vendor/autoload.php
|
- ./vendor/autoload.php
|
||||||
# But also run the task if the last build was not a production build.
|
# But also run the task if the last build was not a production build.
|
||||||
status:
|
status:
|
||||||
- grep -q '"dev": false' ./vendor/composer/installed.json
|
- grep -q '"dev"{{:}} false' ./vendor/composer/installed.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using programmatic checks to cancel the execution of a task and its dependencies
|
### Using programmatic checks to cancel the execution of a task and its dependencies
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ vars:
|
|||||||
|
|
||||||
# Variable references
|
# Variable references
|
||||||
BUILD_VERSION:
|
BUILD_VERSION:
|
||||||
ref: VERSION
|
ref: .VERSION
|
||||||
|
|
||||||
# Map variables
|
# Map variables
|
||||||
CONFIG:
|
CONFIG:
|
||||||
@@ -360,7 +360,7 @@ vars:
|
|||||||
vars:
|
vars:
|
||||||
BASE_VERSION: 1.0.0
|
BASE_VERSION: 1.0.0
|
||||||
FULL_VERSION:
|
FULL_VERSION:
|
||||||
ref: BASE_VERSION
|
ref: .BASE_VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
### Map Variables (`map`)
|
### Map Variables (`map`)
|
||||||
@@ -513,12 +513,19 @@ tasks:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tasks:
|
tasks:
|
||||||
|
# Single prompt
|
||||||
deploy:
|
deploy:
|
||||||
prompt: "Deploy to production?"
|
prompt: "Deploy to production?"
|
||||||
# or multiple prompts
|
cmds:
|
||||||
|
- ./deploy.sh
|
||||||
|
|
||||||
|
# Multiple prompts
|
||||||
|
deploy-multi:
|
||||||
prompt:
|
prompt:
|
||||||
- "Are you sure?"
|
- "Are you sure?"
|
||||||
- "This will affect live users!"
|
- "This will affect live users!"
|
||||||
|
cmds:
|
||||||
|
- ./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `aliases`
|
#### `aliases`
|
||||||
@@ -592,7 +599,7 @@ tasks:
|
|||||||
# Simple precondition (shorthand)
|
# Simple precondition (shorthand)
|
||||||
build:
|
build:
|
||||||
preconditions:
|
preconditions:
|
||||||
- test -f ./src
|
- test -d ./src
|
||||||
cmds:
|
cmds:
|
||||||
- go build ./...
|
- go build ./...
|
||||||
|
|
||||||
@@ -773,7 +780,7 @@ tasks:
|
|||||||
matrix:
|
matrix:
|
||||||
OS: [linux, windows, darwin]
|
OS: [linux, windows, darwin]
|
||||||
ARCH: [amd64, arm64]
|
ARCH: [amd64, arm64]
|
||||||
cmd: echo "Testing {{.OS}}/{{.ARCH}}"
|
cmd: echo "Testing {{.ITEM.OS}}/{{.ITEM.ARCH}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Loop in Dependencies
|
#### Loop in Dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user