From 13458a23281cc0202d9d0e6b1e95f7b5e9fd5112 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 20:06:21 +1000 Subject: [PATCH 01/16] feat(taskfile): create schema skeleton --- taskfile.json | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 taskfile.json diff --git a/taskfile.json b/taskfile.json new file mode 100644 index 0000000..2db873a --- /dev/null +++ b/taskfile.json @@ -0,0 +1,71 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "definitions": { + "version-property": { + "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", + "type": "integer", + "enum": [ + 2, + 3 + ] + }, + "v2-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "additionalProperties": false + }, + "v3-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "additionalProperties": false + } + }, + "title": "tasks", + "description": "Tasks", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", + "type": "integer", + "enum": [ + 2, + 3 + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "version": { + "const": 2 + } + } + }, + "then": { + "$ref": "#/definitions/v2-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": 3 + } + } + }, + "then": { + "$ref": "#/definitions/v3-properties" + } + } + ] +} \ No newline at end of file From 1bdec99d757ca3bc3d19ece85da05c39e7b66efd Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 20:06:46 +1000 Subject: [PATCH 02/16] feat: ignore test yaml file --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c094383 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test.yaml \ No newline at end of file From e7d482dc1b3d0ffc7506697099f0292fad1d1fa5 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 20:19:52 +1000 Subject: [PATCH 03/16] feat: support several versions --- taskfile.json | 80 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 11 deletions(-) diff --git a/taskfile.json b/taskfile.json index 2db873a..3eee185 100644 --- a/taskfile.json +++ b/taskfile.json @@ -3,10 +3,13 @@ "definitions": { "version-property": { "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", - "type": "integer", + "type": "string", "enum": [ - 2, - 3 + "2", + "2.1", + "2.2", + "2.6", + "3" ] }, "v2-properties": { @@ -17,6 +20,30 @@ }, "additionalProperties": false }, + "v2.1-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "additionalProperties": false + }, + "v2.2-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "additionalProperties": false + }, + "v2.6-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "additionalProperties": false + }, "v3-properties": { "properties": { "version": { @@ -34,12 +61,7 @@ ], "properties": { "version": { - "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", - "type": "integer", - "enum": [ - 2, - 3 - ] + "$ref": "#/definitions/version-property" } }, "allOf": [ @@ -47,7 +69,7 @@ "if": { "properties": { "version": { - "const": 2 + "const": "2" } } }, @@ -59,7 +81,43 @@ "if": { "properties": { "version": { - "const": 3 + "const": "2.1" + } + } + }, + "then": { + "$ref": "#/definitions/v2.1-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": "2.2" + } + } + }, + "then": { + "$ref": "#/definitions/v2.2-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": "2.6" + } + } + }, + "then": { + "$ref": "#/definitions/v2.6-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": "3" } } }, From e944da73ba62f6cae463e4990bd41526580b1b4d Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 20:54:11 +1000 Subject: [PATCH 04/16] feat: support v2 version --- taskfile.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/taskfile.json b/taskfile.json index 3eee185..114c3b2 100644 --- a/taskfile.json +++ b/taskfile.json @@ -16,6 +16,51 @@ "properties": { "version": { "$ref": "#/definitions/version-property" + }, + "expansions": { + "description": "An expansion count", + "type": "integer", + "minimum": 1, + "default": 2 + }, + "vars": { + "title": "variables", + "description": "Variables", + "type": "object", + "patternProperties": { + ".": { + "description": "A variable", + "type": ["boolean", "integer", "null", "number", "string"], + "examples": ["Hello, world!"] + } + }, + "additionalProperties": false + }, + "tasks": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task", + "type": "object", + "properties": { + "cmds": { + "description": "Task commands", + "type": "array", + "items": { + "description": "A task command", + "type": "string", + "minLength": 1, + "examples": ["echo \"Hello, world!\""] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } }, "additionalProperties": false From 06ee7103e9990b01e0b45857801a61b0f0085061 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 21:09:46 +1000 Subject: [PATCH 05/16] feat: support v2.1 --- taskfile.json | 142 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 112 insertions(+), 30 deletions(-) diff --git a/taskfile.json b/taskfile.json index 114c3b2..26ce70c 100644 --- a/taskfile.json +++ b/taskfile.json @@ -12,48 +12,129 @@ "3" ] }, + "v2-expansions-property": { + "description": "An expansion count\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "integer", + "minimum": 1, + "default": 2 + }, + "v2-vars-property": { + "title": "variables", + "description": "Variables\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "description": "A variable\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": [ + "boolean", + "integer", + "null", + "number", + "string" + ], + "examples": [ + "Hello, world!" + ] + } + }, + "additionalProperties": false + }, + "v2-tasks-property": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task", + "type": "object", + "properties": { + "cmds": { + "description": "Task commands", + "type": "array", + "items": { + "description": "A task command", + "type": "string", + "minLength": 1, + "examples": [ + "echo \"Hello, world!\"" + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, "v2-properties": { "properties": { "version": { "$ref": "#/definitions/version-property" }, "expansions": { - "description": "An expansion count", - "type": "integer", - "minimum": 1, - "default": 2 + "$ref": "#/definitions/v2-expansions-property" }, "vars": { - "title": "variables", - "description": "Variables", - "type": "object", - "patternProperties": { - ".": { - "description": "A variable", - "type": ["boolean", "integer", "null", "number", "string"], - "examples": ["Hello, world!"] - } - }, - "additionalProperties": false + "$ref": "#/definitions/v2-vars-property" + }, + "tasks": { + "$ref": "#/definitions/v2-tasks-property" + } + }, + "additionalProperties": false + }, + "v2.1-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + }, + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" }, "tasks": { "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", "type": "object", "patternProperties": { ".": { "title": "task", - "description": "A task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", "type": "object", "properties": { "cmds": { - "description": "Task commands", + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", "type": "array", "items": { - "description": "A task command", - "type": "string", - "minLength": 1, - "examples": ["echo \"Hello, world!\""] + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "object", + "properties": { + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": ["echo \"Hello, world!\""] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + } + } + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] } } }, @@ -61,14 +142,15 @@ } }, "additionalProperties": false - } - }, - "additionalProperties": false - }, - "v2.1-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" + }, + "output": { + "description": "An output style\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "enum": [ + "interleaved", + "group", + "prefixed" + ] } }, "additionalProperties": false From 0fec55c70f7c6741381acef7d26c0b5790e3fd16 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 21:19:13 +1000 Subject: [PATCH 06/16] feat: support v2.2 --- taskfile.json | 141 +++++++++++++++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 53 deletions(-) diff --git a/taskfile.json b/taskfile.json index 26ce70c..83a92fc 100644 --- a/taskfile.json +++ b/taskfile.json @@ -84,6 +84,65 @@ }, "additionalProperties": false }, + "v2.1-tasks-property": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "properties": { + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "array", + "items": { + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "object", + "properties": { + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + } + } + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "v2.1-output-property": { + "description": "An output style\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "enum": [ + "interleaved", + "group", + "prefixed" + ] + }, "v2.1-properties": { "properties": { "version": { @@ -96,61 +155,10 @@ "$ref": "#/definitions/v2-vars-property" }, "tasks": { - "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "patternProperties": { - ".": { - "title": "task", - "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "properties": { - "cmds": { - "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "array", - "items": { - "title": "command", - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "oneOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "cmd": { - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "string", - "examples": ["echo \"Hello, world!\""] - }, - "ignore_error": { - "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "boolean", - "default": false - } - } - } - ], - "examples": [ - "echo \"Hello, world!\"" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false + "$ref": "#/definitions/v2.1-tasks-property" }, "output": { - "description": "An output style\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "string", - "enum": [ - "interleaved", - "group", - "prefixed" - ] + "$ref": "#/definitions/v2.1-output-property" } }, "additionalProperties": false @@ -159,6 +167,33 @@ "properties": { "version": { "$ref": "#/definitions/version-property" + }, + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" + }, + "tasks": { + "$ref": "#/definitions/v2.1-tasks-property" + }, + "output": { + "$ref": "#/definitions/v2.1-output-property" + }, + "includes": { + "title": "includes", + "description": "Includes\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "object", + "patternProperties": { + ".": { + "description": "An include\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "string", + "examples": [ + "./documentation" + ] + } + }, + "additionalProperties": false } }, "additionalProperties": false From 0592b84be7da73e7218014d63151baee41c40c62 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 21:27:16 +1000 Subject: [PATCH 07/16] feat: support v2.6 --- taskfile.json | 103 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 13 deletions(-) diff --git a/taskfile.json b/taskfile.json index 83a92fc..22b3d09 100644 --- a/taskfile.json +++ b/taskfile.json @@ -163,6 +163,21 @@ }, "additionalProperties": false }, + "v2.2-includes-property": { + "title": "includes", + "description": "Includes\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "object", + "patternProperties": { + ".": { + "description": "An include\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "string", + "examples": [ + "./documentation" + ] + } + }, + "additionalProperties": false + }, "v2.2-properties": { "properties": { "version": { @@ -181,19 +196,7 @@ "$ref": "#/definitions/v2.1-output-property" }, "includes": { - "title": "includes", - "description": "Includes\nhttps://taskfile.dev/taskfile-versions/#version-22", - "type": "object", - "patternProperties": { - ".": { - "description": "An include\nhttps://taskfile.dev/taskfile-versions/#version-22", - "type": "string", - "examples": [ - "./documentation" - ] - } - }, - "additionalProperties": false + "$ref": "#/definitions/v2.2-includes-property" } }, "additionalProperties": false @@ -202,6 +205,80 @@ "properties": { "version": { "$ref": "#/definitions/version-property" + }, + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" + }, + "tasks": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "properties": { + "preconditions": { + "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "type": "array", + "items": { + "description": "A task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "type": "string", + "minLength": 1, + "examples": [ + "test -f .env" + ] + } + }, + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "array", + "items": { + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "object", + "properties": { + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + } + } + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "output": { + "$ref": "#/definitions/v2.1-output-property" + }, + "includes": { + "$ref": "#/definitions/v2.2-includes-property" } }, "additionalProperties": false From fdd0b7dd5501af8322de7ea9e283d7fbf4f37e03 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 21:28:09 +1000 Subject: [PATCH 08/16] fix: add missing links --- taskfile.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taskfile.json b/taskfile.json index 22b3d09..6707915 100644 --- a/taskfile.json +++ b/taskfile.json @@ -46,14 +46,14 @@ "patternProperties": { ".": { "title": "task", - "description": "A task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "object", "properties": { "cmds": { - "description": "Task commands", + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "array", "items": { - "description": "A task command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "string", "minLength": 1, "examples": [ From 5dea0f6b0f416bcbcdaa77483bd0643d5eada9ea Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 9 Apr 2023 21:29:11 +1000 Subject: [PATCH 09/16] feat: use editor config --- .editorconfig | 7 +++++++ taskfile.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4492505 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = false diff --git a/taskfile.json b/taskfile.json index 6707915..f8d6c42 100644 --- a/taskfile.json +++ b/taskfile.json @@ -365,4 +365,4 @@ } } ] -} \ No newline at end of file +} From b7675e8bdb002bd3f3732da5dba200ba598c3fb0 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Wed, 12 Apr 2023 11:54:37 +1000 Subject: [PATCH 10/16] fix: use singular noun for list item --- taskfile.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskfile.json b/taskfile.json index f8d6c42..f87cac1 100644 --- a/taskfile.json +++ b/taskfile.json @@ -226,7 +226,7 @@ "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", "type": "array", "items": { - "description": "A task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "description": "A task precondition\nhttps://taskfile.dev/taskfile-versions/#version-26", "type": "string", "minLength": 1, "examples": [ From 183998d19eb0d265a70ff90e1b9dcb81f8792234 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Wed, 12 Apr 2023 12:56:36 +1000 Subject: [PATCH 11/16] feat: add partial v3 support Support everything up to "Calling another task" --- taskfile.json | 954 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 622 insertions(+), 332 deletions(-) diff --git a/taskfile.json b/taskfile.json index f87cac1..af7faf3 100644 --- a/taskfile.json +++ b/taskfile.json @@ -1,368 +1,658 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "definitions": { - "version-property": { - "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", - "type": "string", - "enum": [ - "2", - "2.1", - "2.2", - "2.6", - "3" - ] + "$schema": "http://json-schema.org/draft-07/schema", + "definitions": { + "version-property": { + "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", + "type": "string", + "enum": [ + "2", + "2.1", + "2.2", + "2.6", + "3" + ] + }, + "v2-expansions-property": { + "description": "An expansion count\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "integer", + "minimum": 1, + "default": 2 + }, + "v2-vars-property": { + "title": "variables", + "description": "Variables\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "description": "A variable\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": [ + "boolean", + "integer", + "null", + "number", + "string" + ], + "examples": [ + "Hello, world!" + ] + } + }, + "additionalProperties": false + }, + "v2-tasks-property": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "properties": { + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "array", + "items": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "string", + "minLength": 1, + "examples": [ + "echo \"Hello, world!\"" + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "v2-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" }, - "v2-expansions-property": { - "description": "An expansion count\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": "integer", - "minimum": 1, - "default": 2 + "expansions": { + "$ref": "#/definitions/v2-expansions-property" }, - "v2-vars-property": { - "title": "variables", - "description": "Variables\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": "object", - "patternProperties": { - ".": { - "description": "A variable\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": [ - "boolean", - "integer", - "null", - "number", - "string" - ], - "examples": [ - "Hello, world!" - ] - } - }, - "additionalProperties": false + "vars": { + "$ref": "#/definitions/v2-vars-property" }, - "v2-tasks-property": { - "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": "object", - "patternProperties": { - ".": { - "title": "task", - "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-20", + "tasks": { + "$ref": "#/definitions/v2-tasks-property" + } + }, + "additionalProperties": false + }, + "v2.1-tasks-property": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "properties": { + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "array", + "items": { + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { "type": "object", "properties": { - "cmds": { - "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": "array", - "items": { - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-20", - "type": "string", - "minLength": 1, - "examples": [ - "echo \"Hello, world!\"" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + } + } + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "v2.1-output-property": { + "description": "An output style\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "enum": [ + "interleaved", + "group", + "prefixed" + ] + }, + "v2.1-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" }, - "v2-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" - }, - "expansions": { - "$ref": "#/definitions/v2-expansions-property" - }, - "vars": { - "$ref": "#/definitions/v2-vars-property" - }, - "tasks": { - "$ref": "#/definitions/v2-tasks-property" - } - }, - "additionalProperties": false + "expansions": { + "$ref": "#/definitions/v2-expansions-property" }, - "v2.1-tasks-property": { - "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "patternProperties": { - ".": { - "title": "task", - "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "properties": { - "cmds": { - "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "array", - "items": { - "title": "command", - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "oneOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "cmd": { - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "string", - "examples": [ - "echo \"Hello, world!\"" - ] - }, - "ignore_error": { - "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "boolean", - "default": false - } - } - } - ], - "examples": [ - "echo \"Hello, world!\"" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false + "vars": { + "$ref": "#/definitions/v2-vars-property" }, - "v2.1-output-property": { - "description": "An output style\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "string", - "enum": [ - "interleaved", - "group", - "prefixed" - ] + "tasks": { + "$ref": "#/definitions/v2.1-tasks-property" }, - "v2.1-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" - }, - "expansions": { - "$ref": "#/definitions/v2-expansions-property" - }, - "vars": { - "$ref": "#/definitions/v2-vars-property" - }, - "tasks": { - "$ref": "#/definitions/v2.1-tasks-property" - }, - "output": { - "$ref": "#/definitions/v2.1-output-property" - } - }, - "additionalProperties": false + "output": { + "$ref": "#/definitions/v2.1-output-property" + } + }, + "additionalProperties": false + }, + "v2.2-includes-property": { + "title": "includes", + "description": "Includes\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "object", + "patternProperties": { + ".": { + "description": "A taskfile\nhttps://taskfile.dev/taskfile-versions/#version-22", + "type": "string", + "examples": [ + "./documentation" + ] + } + }, + "additionalProperties": false + }, + "v2.2-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + }, + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" }, - "v2.2-includes-property": { - "title": "includes", - "description": "Includes\nhttps://taskfile.dev/taskfile-versions/#version-22", - "type": "object", - "patternProperties": { - ".": { - "description": "An include\nhttps://taskfile.dev/taskfile-versions/#version-22", + "tasks": { + "$ref": "#/definitions/v2.1-tasks-property" + }, + "output": { + "$ref": "#/definitions/v2.1-output-property" + }, + "includes": { + "$ref": "#/definitions/v2.2-includes-property" + } + }, + "additionalProperties": false + }, + "v2.6-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" + }, + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" + }, + "tasks": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "properties": { + "preconditions": { + "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "type": "array", + "items": { + "description": "A task precondition\nhttps://taskfile.dev/taskfile-versions/#version-26", "type": "string", + "minLength": 1, "examples": [ - "./documentation" + "test -f .env" ] + } + }, + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "array", + "items": { + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "object", + "properties": { + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + } + } + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] + } } - }, - "additionalProperties": false + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "output": { + "$ref": "#/definitions/v2.1-output-property" }, - "v2.2-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" + "includes": { + "$ref": "#/definitions/v2.2-includes-property" + } + }, + "additionalProperties": false + }, + "v3-env-property": { + "title": "variables", + "description": "Variables\nhttps://taskfile.dev/usage/#environment-variables", + "type": "object", + "patternProperties": { + ".": { + "description": "A variable\nhttps://taskfile.dev/usage/#environment-variables", + "type": [ + "boolean", + "integer", + "null", + "number", + "string" + ], + "examples": [ + "Hello, world!" + ] + } + }, + "additionalProperties": false + }, + "v3-dotenv-property": { + "description": ".env files\nhttps://taskfile.dev/usage/#env-files", + "uniqueItems": true, + "items": { + "description": "An .env file\nhttps://taskfile.dev/usage/#env-files", + "type": "string", + "minLength": 1, + "examples": [ + ".env" + ] + } + }, + "v3-includes-property": { + "title": "includes", + "description": "Includes\nhttps://taskfile.dev/usage/#including-other-taskfiles", + "type": "object", + "patternProperties": { + ".": { + "title": "include", + "description": "A taskfile\nhttps://taskfile.dev/usage/#including-other-taskfiles", + "oneOf": [ + { + "type": "string", + "minLength": 1, + "examples": [ + "./documentation" + ] + }, + { + "type": "object", + "required": [ + "taskfile" + ], + "properties": { + "taskfile": { + "description": "A taskfile\nhttps://taskfile.dev/usage/#directory-of-included-taskfile", + "type": "string", + "minLength": 1, + "examples": [ + "./docs/Taskfile.yml" + ] }, - "expansions": { - "$ref": "#/definitions/v2-expansions-property" + "dir": { + "description": "A taskfile directory\nhttps://taskfile.dev/usage/#directory-of-included-taskfile", + "type": "string", + "minLength": 1, + "examples": [ + "./docs" + ] }, - "vars": { - "$ref": "#/definitions/v2-vars-property" + "optional": { + "description": "Whether to continue execution if a taskfile is missing\nhttps://taskfile.dev/usage/#optional-includes", + "type": "boolean", + "default": false }, - "tasks": { - "$ref": "#/definitions/v2.1-tasks-property" + "internal": { + "description": "Whether to allow execute a taskfile by user\nhttps://taskfile.dev/usage/#internal-includes", + "type": "boolean", + "default": true }, - "output": { - "$ref": "#/definitions/v2.1-output-property" + "vars": { + "$ref": "#/definitions/v2-vars-property" }, - "includes": { - "$ref": "#/definitions/v2.2-includes-property" + "aliases": { + "description": "Namespace aliases\nhttps://taskfile.dev/usage/#namespace-aliases", + "type": "array", + "items": { + "description": "A namespace alias\nhttps://taskfile.dev/usage/#namespace-aliases", + "type": "string", + "minLength": 1, + "examples": [ + "gen" + ] + } } - }, - "additionalProperties": false + }, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + }, + "v3-platforms-property": { + "description": "Task platforms to run in on\nhttps://taskfile.dev/usage/#platform-specific-tasks-and-commands", + "type": "array", + "uniqueItems": true, + "items": { + "description": "A task platform to run task on\nhttps://taskfile.dev/usage/#platform-specific-tasks-and-commands", + "type": "string", + "enum": [ + "386", + "aix", + "amd64p32", + "amd64", + "android", + "arm64be", + "arm64", + "armbe", + "arm", + "darwin", + "dragonfly", + "freebsd", + "hurd", + "illumos", + "ios", + "js", + "linux", + "loong64", + "mips64le", + "mips64p32le", + "mips64p32", + "mips64", + "mipsle", + "mips", + "nacl", + "netbsd", + "openbsd", + "plan9", + "ppc64le", + "ppc64", + "ppc", + "riscv64", + "riscv", + "s390", + "s390x", + "solaris", + "sparc64", + "sparc", + "wasip1", + "wasm", + "windows", + "zos" + ] + } + }, + "v3-properties": { + "properties": { + "version": { + "$ref": "#/definitions/version-property" }, - "v2.6-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" + "expansions": { + "$ref": "#/definitions/v2-expansions-property" + }, + "env": { + "$ref": "#/definitions/v3-env-property" + }, + "dotenv": { + "$ref": "#/definitions/v3-dotenv-property" + }, + "tasks": { + "title": "tasks", + "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "patternProperties": { + ".": { + "title": "task", + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "object", + "properties": { + "preconditions": { + "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "type": "array", + "items": { + "description": "A task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "type": "string", + "minLength": 1, + "examples": [ + "test -f .env" + ] + } + }, + "cmds": { + "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "array", + "items": { + "title": "command", + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "object", + "properties": { + "cmd": { + "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + }, + "platforms": { + "$ref": "#/definitions/v3-platforms-property" + } + }, + "additionalProperties": false + } + ], + "examples": [ + "echo \"Hello, world!\"" + ] + } }, - "expansions": { - "$ref": "#/definitions/v2-expansions-property" + "dir": { + "description": "A directory to run commands from\nhttps://taskfile.dev/usage/#running-a-taskfile-from-a-subdirectory", + "type": "string", + "minLength": 1, + "examples": [ + "{{.USER_WORKING_DIR}}" + ] }, - "vars": { - "$ref": "#/definitions/v2-vars-property" + "env": { + "$ref": "#/definitions/v3-env-property" }, - "tasks": { - "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "patternProperties": { - ".": { - "title": "task", - "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "object", - "properties": { - "preconditions": { - "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", - "type": "array", - "items": { - "description": "A task precondition\nhttps://taskfile.dev/taskfile-versions/#version-26", - "type": "string", - "minLength": 1, - "examples": [ - "test -f .env" - ] - } - }, - "cmds": { - "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "array", - "items": { - "title": "command", - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "oneOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "cmd": { - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "string", - "examples": [ - "echo \"Hello, world!\"" - ] - }, - "ignore_error": { - "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", - "type": "boolean", - "default": false - } - } - } - ], - "examples": [ - "echo \"Hello, world!\"" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false + "dotenv": { + "$ref": "#/definitions/v3-dotenv-property" }, - "output": { - "$ref": "#/definitions/v2.1-output-property" + "deps": { + "description": "Task dependencies\nhttps://taskfile.dev/usage/#task-dependencies", + "type": "array", + "uniqueItems": true, + "items": { + "title": "dependency", + "description": "A task dependency\nhttps://taskfile.dev/usage/#task-dependencies", + "oneOf": [ + { + "type": "string", + "minLength": 1, + "examples": [ + "assets" + ] + }, + { + "type": "object", + "properties": { + "task": { + "description": "A task\nhttps://taskfile.dev/usage/#task-dependencies", + "type": "string", + "minLength": 1, + "examples": [ + "assets" + ] + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" + } + }, + "additionalProperties": false + } + ] + } }, - "includes": { - "$ref": "#/definitions/v2.2-includes-property" + "platforms": { + "$ref": "#/definitions/v3-platforms-property" } - }, - "additionalProperties": false + }, + "additionalProperties": false + } + }, + "additionalProperties": false }, - "v3-properties": { - "properties": { - "version": { - "$ref": "#/definitions/version-property" - } - }, - "additionalProperties": false + "output": { + "$ref": "#/definitions/v2.1-output-property" + }, + "includes": { + "$ref": "#/definitions/v3-includes-property" } + }, + "additionalProperties": false + } + }, + "title": "tasks", + "description": "Tasks", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/definitions/version-property" + } + }, + "allOf": [ + { + "if": { + "properties": { + "version": { + "const": "2" + } + } + }, + "then": { + "$ref": "#/definitions/v2-properties" + } }, - "title": "tasks", - "description": "Tasks", - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "$ref": "#/definitions/version-property" + { + "if": { + "properties": { + "version": { + "const": "2.1" + } } + }, + "then": { + "$ref": "#/definitions/v2.1-properties" + } }, - "allOf": [ - { - "if": { - "properties": { - "version": { - "const": "2" - } - } - }, - "then": { - "$ref": "#/definitions/v2-properties" - } - }, - { - "if": { - "properties": { - "version": { - "const": "2.1" - } - } - }, - "then": { - "$ref": "#/definitions/v2.1-properties" - } - }, - { - "if": { - "properties": { - "version": { - "const": "2.2" - } - } - }, - "then": { - "$ref": "#/definitions/v2.2-properties" - } - }, - { - "if": { - "properties": { - "version": { - "const": "2.6" - } - } - }, - "then": { - "$ref": "#/definitions/v2.6-properties" - } - }, - { - "if": { - "properties": { - "version": { - "const": "3" - } - } - }, - "then": { - "$ref": "#/definitions/v3-properties" - } + { + "if": { + "properties": { + "version": { + "const": "2.2" + } + } + }, + "then": { + "$ref": "#/definitions/v2.2-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": "2.6" + } + } + }, + "then": { + "$ref": "#/definitions/v2.6-properties" + } + }, + { + "if": { + "properties": { + "version": { + "const": "3" + } } - ] + }, + "then": { + "$ref": "#/definitions/v3-properties" + } + } + ] } From 1f94ae3bba161d67c95c8dd8072db7f42ab031b1 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Thu, 13 Apr 2023 13:14:27 +1000 Subject: [PATCH 12/16] feat: require `cmd` key --- taskfile.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taskfile.json b/taskfile.json index af7faf3..9b5aae9 100644 --- a/taskfile.json +++ b/taskfile.json @@ -489,6 +489,9 @@ }, { "type": "object", + "required": [ + "cmd" + ], "properties": { "cmd": { "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-21", From bea38ded4c64f4d7ff7022baaa8f97957192a86d Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Thu, 13 Apr 2023 13:29:42 +1000 Subject: [PATCH 13/16] feat: support calling tasks form `cmd` --- taskfile.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/taskfile.json b/taskfile.json index 9b5aae9..de82b10 100644 --- a/taskfile.json +++ b/taskfile.json @@ -510,6 +510,34 @@ } }, "additionalProperties": false + }, + { + "title": "task", + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "string", + "examples": [ + "echo \"Hello, world!\"" + ] + }, + "ignore_error": { + "description": "Whether ignore an error\nhttps://taskfile.dev/taskfile-versions/#version-21", + "type": "boolean", + "default": false + }, + "platforms": { + "$ref": "#/definitions/v3-platforms-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" + } + }, + "additionalProperties": false } ], "examples": [ @@ -568,6 +596,9 @@ }, "platforms": { "$ref": "#/definitions/v3-platforms-property" + }, + "vars": { + "$ref": "#/definitions/v2-vars-property" } }, "additionalProperties": false From a2511bfeb2739e98599597c47ab8e1d217cad8ea Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Thu, 13 Apr 2023 14:12:48 +1000 Subject: [PATCH 14/16] feat: implement everything up to `defer` --- taskfile.json | 106 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/taskfile.json b/taskfile.json index de82b10..df2ef63 100644 --- a/taskfile.json +++ b/taskfile.json @@ -440,6 +440,46 @@ ] } }, + "v3-vars-property": { + "title": "variables", + "description": "Variables\nhttps://taskfile.dev/taskfile-versions/#version-20", + "type": "object", + "patternProperties": { + ".": { + "description": "A variable\nhttps://taskfile.dev/taskfile-versions/#version-20", + "oneOf": [ + { + "type": [ + "boolean", + "integer", + "null", + "number", + "string" + ], + "examples": [ + "Hello, world!" + ] + }, + { + "title": "variable", + "type": "object", + "required": [ + "sh" + ], + "properties": { + "sh": { + "description": "A command\nhttps://taskfile.dev/usage/#dynamic-variables", + "type": "string", + "minLength": 1, + "examples": ["git log -n 1 --format=%h"] + } + } + } + ] + } + }, + "additionalProperties": false + }, "v3-properties": { "properties": { "version": { @@ -468,7 +508,7 @@ "description": "Task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", "type": "array", "items": { - "description": "A task preconditions\nhttps://taskfile.dev/taskfile-versions/#version-26", + "description": "A task precondition\nhttps://taskfile.dev/taskfile-versions/#version-26", "type": "string", "minLength": 1, "examples": [ @@ -534,7 +574,7 @@ "$ref": "#/definitions/v3-platforms-property" }, "vars": { - "$ref": "#/definitions/v2-vars-property" + "$ref": "#/definitions/v3-vars-property" } }, "additionalProperties": false @@ -586,7 +626,7 @@ ] }, "vars": { - "$ref": "#/definitions/v2-vars-property" + "$ref": "#/definitions/v3-vars-property" } }, "additionalProperties": false @@ -598,7 +638,62 @@ "$ref": "#/definitions/v3-platforms-property" }, "vars": { - "$ref": "#/definitions/v2-vars-property" + "$ref": "#/definitions/v3-vars-property" + }, + "sources": { + "description": "Build sources\nhttps://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources", + "type": "array", + "uniqueItems": true, + "items": { + "description": "A build source\nhttps://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources", + "type": "string", + "minLength": 1, + "examples": [ + "src/js/**/*.js" + ] + } + }, + "generates": { + "description": "Build outputs\nhttps://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources", + "type": "array", + "uniqueItems": true, + "items": { + "description": "A build output\nhttps://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources", + "type": "string", + "minLength": 1, + "examples": [ + "public/bundle.css" + ] + } + }, + "method": { + "description": "An automatic comparison method\nhttps://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources", + "type": "string", + "enum": [ + "none", + "checksum", + "timestamp" + ] + }, + "status": { + "description": "Manual comparison commands\nhttps://taskfile.dev/usage/#using-programmatic-checks-to-indicate-a-task-is-up-to-date", + "type": "array", + "items": { + "description": "A manual comparison command\nhttps://taskfile.dev/usage/#using-programmatic-checks-to-indicate-a-task-is-up-to-date", + "type": "string", + "examples": [ + "test -d directory" + ] + } + }, + "run": { + "description": "A run condition\nhttps://taskfile.dev/usage/#limiting-when-tasks-run", + "type": "string", + "enum": [ + "always", + "once", + "when_changed" + ] } }, "additionalProperties": false @@ -611,6 +706,9 @@ }, "includes": { "$ref": "#/definitions/v3-includes-property" + }, + "vars": { + "$ref": "#/definitions/v3-vars-property" } }, "additionalProperties": false From 0b4c16e0fcd6fcdbe043e84b3774dc51ea4e2119 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Thu, 13 Apr 2023 14:17:21 +1000 Subject: [PATCH 15/16] feat: enhance `version` description --- taskfile.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskfile.json b/taskfile.json index df2ef63..fd4c607 100644 --- a/taskfile.json +++ b/taskfile.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "version-property": { - "description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started", + "description": "A syntax version for the current file\nhttps://taskfile.dev/usage/#getting-started", "type": "string", "enum": [ "2", From b4571411eaf22cfb3f4bce40c64f6a313380bc53 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Thu, 13 Apr 2023 14:34:31 +1000 Subject: [PATCH 16/16] feat: update v2 subschema --- taskfile.json | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/taskfile.json b/taskfile.json index fd4c607..4680da0 100644 --- a/taskfile.json +++ b/taskfile.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "version-property": { + "title": "version", "description": "A syntax version for the current file\nhttps://taskfile.dev/usage/#getting-started", "type": "string", "enum": [ @@ -13,14 +14,15 @@ ] }, "v2-expansions-property": { - "description": "An expansion count\nhttps://taskfile.dev/taskfile-versions/#version-20", + "title": "expansions", + "description": "An expansion count for the current file\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "integer", "minimum": 1, "default": 2 }, "v2-vars-property": { "title": "variables", - "description": "Variables\nhttps://taskfile.dev/taskfile-versions/#version-20", + "description": "Variables for the current file\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "object", "patternProperties": { ".": { @@ -33,7 +35,8 @@ "string" ], "examples": [ - "Hello, world!" + "FIRST-NAME", + "{{.FIRST-NAME}}" ] } }, @@ -41,19 +44,20 @@ }, "v2-tasks-property": { "title": "tasks", - "description": "Tasks\nhttps://taskfile.dev/taskfile-versions/#version-20", + "description": "Tasks for the current file\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "object", "patternProperties": { ".": { "title": "task", - "description": "A task\nhttps://taskfile.dev/taskfile-versions/#version-20", + "description": "A task for the current file\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "object", "properties": { "cmds": { - "description": "Task commands\nhttps://taskfile.dev/taskfile-versions/#version-20", + "title": "commands", + "description": "Commands for the current task\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "array", "items": { - "description": "A task command\nhttps://taskfile.dev/taskfile-versions/#version-20", + "description": "A command for the current task\nhttps://taskfile.dev/taskfile-versions/#version-20", "type": "string", "minLength": 1, "examples": [ @@ -471,7 +475,9 @@ "description": "A command\nhttps://taskfile.dev/usage/#dynamic-variables", "type": "string", "minLength": 1, - "examples": ["git log -n 1 --format=%h"] + "examples": [ + "git log -n 1 --format=%h" + ] } } }