diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index e1cb11aba0f..d634de401b6 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -7710,6 +7710,12 @@ "versions": { "19.0.0": "https://json.schemastore.org/vtcfg-v19.0.0.json" } + }, + { + "name": "sake", + "description": "Configuration for Sake, Swift-based utility for managing project commands", + "fileMatch": [".sake.yml"], + "url": "https://json.schemastore.org/sake.json" } ] } diff --git a/src/schemas/json/cargo-make.json b/src/schemas/json/cargo-make.json index c2ad62d3da3..c68e7ba63c5 100644 --- a/src/schemas/json/cargo-make.json +++ b/src/schemas/json/cargo-make.json @@ -545,6 +545,17 @@ } } } + }, + "condition_type": { + "description": "How multiple conditions are evaluated", + "enum": ["And", "Or", "GroupOr"], + "type": "string", + "default": "And", + "x-taplo": { + "links": { + "key": "https://sagiegurari.github.io/cargo-make/#usage-conditions-and-or" + } + } } } }, diff --git a/src/schemas/json/sake.json b/src/schemas/json/sake.json new file mode 100644 index 00000000000..2f86855f379 --- /dev/null +++ b/src/schemas/json/sake.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/sake.json", + "title": "Sake configuration file", + "description": "Configuration schema for Sake, Swift-based utility for managing project commands", + "type": "object", + "properties": { + "case_converting_strategy": { + "type": "string", + "enum": ["keepOriginal", "toSnakeCase", "toKebabCase"], + "description": "Strategy for converting command names" + }, + "sake_app_path": { + "type": "string", + "description": "Path to the SakeApp package" + }, + "sake_app_prebuilt_binary_path": { + "type": "string", + "description": "Path to the prebuilt SakeApp executable" + } + }, + "additionalProperties": false +} diff --git a/src/test/cargo-make/cargo-make.json b/src/test/cargo-make/cargo-make.json index c667705e1a3..b895636b48f 100644 --- a/src/test/cargo-make/cargo-make.json +++ b/src/test/cargo-make/cargo-make.json @@ -9,6 +9,10 @@ "install_crate": "rustfmt" }, "format2": { + "condition": { + "condition_type": "Or", + "files_exist": ["src/main.rs", "src/lib.rs"] + }, "dependencies": ["format"] } } diff --git a/src/test/sake/complete-example.sake.yml b/src/test/sake/complete-example.sake.yml new file mode 100644 index 00000000000..029442740ae --- /dev/null +++ b/src/test/sake/complete-example.sake.yml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=../../schemas/json/sake.json +case_converting_strategy: toSnakeCase +sake_app_path: ./SakeApp +sake_app_prebuilt_binary_path: ./SakeApp/.build/debug/SakeApp diff --git a/src/test/sake/incomplete-example.sake.yml b/src/test/sake/incomplete-example.sake.yml new file mode 100644 index 00000000000..3187e158618 --- /dev/null +++ b/src/test/sake/incomplete-example.sake.yml @@ -0,0 +1,2 @@ +# yaml-language-server: $schema=../../schemas/json/sake.json +case_converting_strategy: toSnakeCase