diff --git a/CHANGELOG.md b/CHANGELOG.md index fd96a360..fbaed186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/static/schema.json b/docs/static/schema.json index 70d49a28..b1f54af5 100644 --- a/docs/static/schema.json +++ b/docs/static/schema.json @@ -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": {