1
0
mirror of https://github.com/go-task/task.git synced 2025-01-04 03:48:02 +02:00

fix: defer keyword in json schema

Closes #1288
This commit is contained in:
Calvin McLean 2023-07-30 20:51:26 -07:00 committed by Andrey Nering
parent 0cddd8c167
commit c42bc6914e
2 changed files with 27 additions and 4 deletions

View File

@ -4,6 +4,7 @@
- Fix a missing a line break on log when using `--watch` mode (#1285, #1297 by
@FilipSolich).
- Fix `defer` on JSON Schema (#1288 by @calvinmclean and @andreynering).
## v3.28.0 - 2023-07-24

View File

@ -208,6 +208,9 @@
{
"$ref": "#/definitions/3/task_call"
},
{
"$ref": "#/definitions/3/defer_call"
},
{
"$ref": "#/definitions/3/for_call"
}
@ -308,10 +311,6 @@
"description": "Prevent command from aborting the execution of task even after receiving a status code of 1",
"type": "boolean"
},
"defer": {
"description": "",
"type": "boolean"
},
"platforms": {
"description": "Specifies which platforms the command should be run on.",
"type": "array",
@ -323,6 +322,29 @@
"additionalProperties": false,
"required": ["cmd"]
},
"defer_call": {
"type": "object",
"properties": {
"defer": {
"description": "Run a command when the task completes. This command will run even when the task fails",
"anyOf": [
"string",
{
"type": "object",
"properties": {
"task": {
"description": "Name of the task to defer",
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false,
"required": ["defer"]
},
"for_call": {
"type": "object",
"properties": {