From 036edce8dc301d1a9a3263f24890f1fc8e3d69fb Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 21 May 2023 21:16:05 +1000 Subject: [PATCH 01/10] feat(schema): intellisence for workflows --- .vscode/settings.json | 5 ++ schemas/workflow.json | 121 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 schemas/workflow.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..39afddd7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "schemas/workflow.json": "specs/*/*.yaml" + } +} \ No newline at end of file diff --git a/schemas/workflow.json b/schemas/workflow.json new file mode 100644 index 00000000..d725f383 --- /dev/null +++ b/schemas/workflow.json @@ -0,0 +1,121 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "workflow", + "description": "A workflow", + "type": "object", + "required": [ + "name", + "command" + ], + "properties": { + "name": { + "title": "name", + "description": "A name of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#name", + "type": "string", + "minLength": 1, + "examples": [ + "Root your emulator" + ] + }, + "command": { + "title": "command", + "description": "A command of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#command", + "type": "string", + "minLength": 1, + "examples": [ + "adb root" + ] + }, + "tags": { + "title": "tags", + "description": "Tags of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#tags", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "description": "A tag of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#tags", + "type": "string", + "minLength": 1, + "examples": [ + "android" + ] + } + }, + "description": { + "title": "description", + "description": "A description of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#description", + "minLength": 1, + "$ref": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/base.json#definitions/nullable-string" + }, + "source_url": { + "title": "source url", + "description": "A source url of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#source_url", + "type": "string", + "minLength": 1, + "pattern": "^https?://.+" + }, + "author": { + "title": "author", + "description": "An author of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#author", + "type": "string", + "minLength": 1 + }, + "author_url": { + "title": "author url", + "description": "An author url of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#author_url", + "type": "string", + "minLength": 1, + "pattern": "^https?://.+" + }, + "shells": { + "title": "shells", + "description": "Shells where the current workflow is valid\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#shells", + "type": "array", + "uniqueItems": true, + "items": { + "description": "A shell where the current workflow is valid\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#shells", + "type": "string", + "enum": [ + "zsh", + "bash", + "fish" + ] + } + }, + "arguments": { + "title": "arguments", + "description": "Arguments of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#arguments", + "type": "array", + "uniqueItems": true, + "items": { + "description": "An argument of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#arguments", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "name", + "description": "A name of the current argument\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#argumentsname", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "description", + "description": "A description of the current argument\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#argumentsdescription", + "type": "string", + "minLength": 1 + }, + "default_value": { + "title": "default value", + "description": "A default value of the current argument\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#argumentsdefault_value", + "minLength": 1, + "$ref": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/base.json#definitions/nullable-string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false +} \ No newline at end of file From db9901f590357307830c120159897fda67596d2c Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Sun, 21 May 2023 21:20:46 +1000 Subject: [PATCH 02/10] feat(ci): validate workflows --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index effe7800..2aeb873c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,3 +41,13 @@ jobs: with: command: clippy args: --tests -- -D warnings + + - name: Install JSON schema validator + run: pip3 install jsonschema-cli + + - name: Run jsonschema-cli validate + run: | + shopt -s extglob + for directory in specs/*; do + env -C "$directory" jsonschema-cli validate "../../schemas/theme.json" *.yaml + done From 54c3846cf57b99f4f3790c7bf99e87647a55fd15 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Tue, 22 Aug 2023 21:19:27 +1000 Subject: [PATCH 03/10] test(ci): check runner directory --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2aeb873c..24a13cd9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,3 +51,6 @@ jobs: for directory in specs/*; do env -C "$directory" jsonschema-cli validate "../../schemas/theme.json" *.yaml done + + - name: Test + run: pwd From 153300f3e2a353ad26395a11f2feb7035e768280 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Tue, 22 Aug 2023 22:02:15 +1000 Subject: [PATCH 04/10] fix(ci): schema validation --- .github/workflows/ci.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 24a13cd9..be1dc333 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,9 +48,7 @@ jobs: - name: Run jsonschema-cli validate run: | shopt -s extglob - for directory in specs/*; do - env -C "$directory" jsonschema-cli validate "../../schemas/theme.json" *.yaml + for file in specs/**/*.yaml; do + echo "Validating '$file'..." + jsonschema-cli validate ./schemas/workflow.json "$file" done - - - name: Test - run: pwd From fd9bb37061bccb70d2f137a25de26c626eb42294 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Tue, 22 Aug 2023 22:03:45 +1000 Subject: [PATCH 05/10] fix(schema): workflow.json --- schemas/workflow.json | 51 ++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/schemas/workflow.json b/schemas/workflow.json index d725f383..17d3dbed 100644 --- a/schemas/workflow.json +++ b/schemas/workflow.json @@ -1,5 +1,30 @@ { "$schema": "http://json-schema.org/draft-07/schema", + "definitions": { + "url": { + "oneOf": [ + { + "type": "string", + "minLength": 1, + "pattern": "^https?://.+" + }, + { + "type": "null" + } + ] + }, + "nullable-string": { + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] + } + }, "title": "workflow", "description": "A workflow", "type": "object", @@ -31,7 +56,6 @@ "description": "Tags of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#tags", "type": "array", "uniqueItems": true, - "minItems": 1, "items": { "description": "A tag of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#tags", "type": "string", @@ -44,28 +68,22 @@ "description": { "title": "description", "description": "A description of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#description", - "minLength": 1, - "$ref": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/base.json#definitions/nullable-string" + "$ref": "#/definitions/nullable-string" }, "source_url": { "title": "source url", "description": "A source url of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#source_url", - "type": "string", - "minLength": 1, - "pattern": "^https?://.+" + "$ref": "#/definitions/url" }, "author": { "title": "author", "description": "An author of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#author", - "type": "string", - "minLength": 1 + "$ref": "#/definitions/nullable-string" }, "author_url": { "title": "author url", "description": "An author url of the current workflow\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#author_url", - "type": "string", - "minLength": 1, - "pattern": "^https?://.+" + "$ref": "#/definitions/url" }, "shells": { "title": "shells", @@ -103,14 +121,17 @@ "description": { "title": "description", "description": "A description of the current argument\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#argumentsdescription", - "type": "string", - "minLength": 1 + "$ref": "#/definitions/nullable-string" }, "default_value": { "title": "default value", "description": "A default value of the current argument\nhttps://github.com/EmilySeville7cfg/warp-workflows/blob/main/FORMAT.md#argumentsdefault_value", - "minLength": 1, - "$ref": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/base.json#definitions/nullable-string" + "type": [ + "boolean", + "number", + "string", + "null" + ] } }, "additionalProperties": false From 49ed65d2b99a778b7ad861aafc3cd0f84f94cfc3 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Tue, 22 Aug 2023 22:04:06 +1000 Subject: [PATCH 06/10] fix(spec): workflows --- specs/git/rebase_master_into_current_branch.yaml | 2 +- specs/shell/array_append_values.yaml | 4 ++-- specs/shell/array_create.yaml | 4 ++-- specs/shell/array_get_size.yaml | 4 ++-- specs/shell/array_get_value.yaml | 4 ++-- specs/shell/array_loop_through.yaml | 4 ++-- specs/shell/array_set_value.yaml | 4 ++-- specs/shell/chain_commands_together_pipe.yaml | 4 ++-- specs/shell/check_if_a_file_exists.yaml | 4 ++-- specs/shell/check_if_a_file_exists_and_is_a_regular_file.yaml | 4 ++-- specs/shell/check_if_a_file_exists_and_is_directory.yaml | 4 ++-- .../check_if_a_number_is_greater_than_another_number.yaml | 4 ++-- ...f_a_number_is_greater_than_or_equal_to_another_number.yaml | 4 ++-- .../shell/check_if_a_number_is_less_than_another_number.yaml | 4 ++-- ...k_if_a_number_is_less_than_or_equal_to_another_number.yaml | 4 ++-- ...check_if_file_exists_and_has_a_size_greater_than_zero.yaml | 4 ++-- ..._file_exists_and_is_executable_by_the_current_process.yaml | 4 ++-- ...if_file_exists_and_is_readable_by_the_current_process.yaml | 4 ++-- ...if_file_exists_and_is_writable_by_the_current_process.yaml | 4 ++-- specs/shell/check_if_string_length_is_non_zero.yaml | 4 ++-- specs/shell/check_if_string_length_is_zero.yaml | 4 ++-- specs/shell/check_if_two_numbers_are_equal.yaml | 4 ++-- .../check_if_two_numbers_are_not_equal_to_each_other.yaml | 4 ++-- specs/shell/check_if_two_strings_are_equal_to_each_other.yaml | 4 ++-- .../check_if_two_strings_are_not_equal_to_each_other.yaml | 4 ++-- .../shell/read_file_contents_as_input_to_another_command.yaml | 4 ++-- specs/shell/redirect_output_of_command_to_a_file.yaml | 4 ++-- .../redirect_output_of_command_to_a_file_by_appending.yaml | 4 ++-- specs/shell/redirect_stderr.yaml | 4 ++-- specs/shell/redirect_stdout.yaml | 4 ++-- specs/shell/shell_for_loop.yaml | 4 ++-- specs/shell/shell_while_loop.yaml | 4 ++-- specs/zip/compress_subdirectories_under_folder.yaml | 2 +- 33 files changed, 64 insertions(+), 64 deletions(-) diff --git a/specs/git/rebase_master_into_current_branch.yaml b/specs/git/rebase_master_into_current_branch.yaml index a53086c8..e6f56b3a 100644 --- a/specs/git/rebase_master_into_current_branch.yaml +++ b/specs/git/rebase_master_into_current_branch.yaml @@ -10,7 +10,7 @@ tags: - git description: Rebases master into the feature branch arguments: [] -source_url: "" +source_url: ~ author: Varun Jindal author_url: "https://www.linkedin.com/in/varun-jindal/" shells: [] diff --git a/specs/shell/array_append_values.yaml b/specs/shell/array_append_values.yaml index e7c137d9..ac543b83 100644 --- a/specs/shell/array_append_values.yaml +++ b/specs/shell/array_append_values.yaml @@ -15,5 +15,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/array_create.yaml b/specs/shell/array_create.yaml index 48567633..f9bb1dc2 100644 --- a/specs/shell/array_create.yaml +++ b/specs/shell/array_create.yaml @@ -12,5 +12,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash \ No newline at end of file + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/array_get_size.yaml b/specs/shell/array_get_size.yaml index 4712701a..591de434 100644 --- a/specs/shell/array_get_size.yaml +++ b/specs/shell/array_get_size.yaml @@ -12,5 +12,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash \ No newline at end of file + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/array_get_value.yaml b/specs/shell/array_get_value.yaml index 5c4c59ed..ce1f114a 100644 --- a/specs/shell/array_get_value.yaml +++ b/specs/shell/array_get_value.yaml @@ -15,5 +15,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash \ No newline at end of file + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/array_loop_through.yaml b/specs/shell/array_loop_through.yaml index dfe6cccb..13c7a812 100644 --- a/specs/shell/array_loop_through.yaml +++ b/specs/shell/array_loop_through.yaml @@ -15,5 +15,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash \ No newline at end of file + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/array_set_value.yaml b/specs/shell/array_set_value.yaml index 419309dc..54a9fb6c 100644 --- a/specs/shell/array_set_value.yaml +++ b/specs/shell/array_set_value.yaml @@ -18,5 +18,5 @@ source_url: "https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-a author: Wyatt-Stanke author_url: "https://github.com/Wyatt-Stanke" shells: - - Zsh - - Bash \ No newline at end of file + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/chain_commands_together_pipe.yaml b/specs/shell/chain_commands_together_pipe.yaml index 4cb793d4..c0dee03b 100644 --- a/specs/shell/chain_commands_together_pipe.yaml +++ b/specs/shell/chain_commands_together_pipe.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_a_file_exists.yaml b/specs/shell/check_if_a_file_exists.yaml index c3ee851b..cf1f81a6 100644 --- a/specs/shell/check_if_a_file_exists.yaml +++ b/specs/shell/check_if_a_file_exists.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_a_file_exists_and_is_a_regular_file.yaml b/specs/shell/check_if_a_file_exists_and_is_a_regular_file.yaml index 0746aff4..81605c1d 100644 --- a/specs/shell/check_if_a_file_exists_and_is_a_regular_file.yaml +++ b/specs/shell/check_if_a_file_exists_and_is_a_regular_file.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_a_file_exists_and_is_directory.yaml b/specs/shell/check_if_a_file_exists_and_is_directory.yaml index 994cfc97..db999d4a 100644 --- a/specs/shell/check_if_a_file_exists_and_is_directory.yaml +++ b/specs/shell/check_if_a_file_exists_and_is_directory.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_a_number_is_greater_than_another_number.yaml b/specs/shell/check_if_a_number_is_greater_than_another_number.yaml index 1189569a..54c0ee62 100644 --- a/specs/shell/check_if_a_number_is_greater_than_another_number.yaml +++ b/specs/shell/check_if_a_number_is_greater_than_another_number.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_a_number_is_greater_than_or_equal_to_another_number.yaml b/specs/shell/check_if_a_number_is_greater_than_or_equal_to_another_number.yaml index f062fee3..e99b3917 100644 --- a/specs/shell/check_if_a_number_is_greater_than_or_equal_to_another_number.yaml +++ b/specs/shell/check_if_a_number_is_greater_than_or_equal_to_another_number.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_a_number_is_less_than_another_number.yaml b/specs/shell/check_if_a_number_is_less_than_another_number.yaml index cdc8530e..67ec3bd5 100644 --- a/specs/shell/check_if_a_number_is_less_than_another_number.yaml +++ b/specs/shell/check_if_a_number_is_less_than_another_number.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_a_number_is_less_than_or_equal_to_another_number.yaml b/specs/shell/check_if_a_number_is_less_than_or_equal_to_another_number.yaml index 53289efb..47940dc9 100644 --- a/specs/shell/check_if_a_number_is_less_than_or_equal_to_another_number.yaml +++ b/specs/shell/check_if_a_number_is_less_than_or_equal_to_another_number.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_file_exists_and_has_a_size_greater_than_zero.yaml b/specs/shell/check_if_file_exists_and_has_a_size_greater_than_zero.yaml index 003a957c..43d8ea3a 100644 --- a/specs/shell/check_if_file_exists_and_has_a_size_greater_than_zero.yaml +++ b/specs/shell/check_if_file_exists_and_has_a_size_greater_than_zero.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_file_exists_and_is_executable_by_the_current_process.yaml b/specs/shell/check_if_file_exists_and_is_executable_by_the_current_process.yaml index d22e4088..dae17c21 100644 --- a/specs/shell/check_if_file_exists_and_is_executable_by_the_current_process.yaml +++ b/specs/shell/check_if_file_exists_and_is_executable_by_the_current_process.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_file_exists_and_is_readable_by_the_current_process.yaml b/specs/shell/check_if_file_exists_and_is_readable_by_the_current_process.yaml index f9f98b10..ba9493b9 100644 --- a/specs/shell/check_if_file_exists_and_is_readable_by_the_current_process.yaml +++ b/specs/shell/check_if_file_exists_and_is_readable_by_the_current_process.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_file_exists_and_is_writable_by_the_current_process.yaml b/specs/shell/check_if_file_exists_and_is_writable_by_the_current_process.yaml index 4dab319a..7b13d3c9 100644 --- a/specs/shell/check_if_file_exists_and_is_writable_by_the_current_process.yaml +++ b/specs/shell/check_if_file_exists_and_is_writable_by_the_current_process.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_string_length_is_non_zero.yaml b/specs/shell/check_if_string_length_is_non_zero.yaml index 53fa4706..1056ce8e 100644 --- a/specs/shell/check_if_string_length_is_non_zero.yaml +++ b/specs/shell/check_if_string_length_is_non_zero.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_string_length_is_zero.yaml b/specs/shell/check_if_string_length_is_zero.yaml index 9f60db7b..8973f04e 100644 --- a/specs/shell/check_if_string_length_is_zero.yaml +++ b/specs/shell/check_if_string_length_is_zero.yaml @@ -12,5 +12,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_two_numbers_are_equal.yaml b/specs/shell/check_if_two_numbers_are_equal.yaml index 2fd413f4..c9acb574 100644 --- a/specs/shell/check_if_two_numbers_are_equal.yaml +++ b/specs/shell/check_if_two_numbers_are_equal.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_two_numbers_are_not_equal_to_each_other.yaml b/specs/shell/check_if_two_numbers_are_not_equal_to_each_other.yaml index 9555d094..614f9196 100644 --- a/specs/shell/check_if_two_numbers_are_not_equal_to_each_other.yaml +++ b/specs/shell/check_if_two_numbers_are_not_equal_to_each_other.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/check_if_two_strings_are_equal_to_each_other.yaml b/specs/shell/check_if_two_strings_are_equal_to_each_other.yaml index a05d3e1a..dcd08984 100644 --- a/specs/shell/check_if_two_strings_are_equal_to_each_other.yaml +++ b/specs/shell/check_if_two_strings_are_equal_to_each_other.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash diff --git a/specs/shell/check_if_two_strings_are_not_equal_to_each_other.yaml b/specs/shell/check_if_two_strings_are_not_equal_to_each_other.yaml index b8fab5fc..d3f8e2c5 100644 --- a/specs/shell/check_if_two_strings_are_not_equal_to_each_other.yaml +++ b/specs/shell/check_if_two_strings_are_not_equal_to_each_other.yaml @@ -15,5 +15,5 @@ source_url: "https://linuxhint.com/bash-test-command/" author: Sidratul Muntaha author_url: "https://linuxhint.com/author/lh_sidratul_muntaha/" shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/read_file_contents_as_input_to_another_command.yaml b/specs/shell/read_file_contents_as_input_to_another_command.yaml index 61797ddd..94ed2690 100644 --- a/specs/shell/read_file_contents_as_input_to_another_command.yaml +++ b/specs/shell/read_file_contents_as_input_to_another_command.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/redirect_output_of_command_to_a_file.yaml b/specs/shell/redirect_output_of_command_to_a_file.yaml index 24a9727e..91bb9f0c 100644 --- a/specs/shell/redirect_output_of_command_to_a_file.yaml +++ b/specs/shell/redirect_output_of_command_to_a_file.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/redirect_output_of_command_to_a_file_by_appending.yaml b/specs/shell/redirect_output_of_command_to_a_file_by_appending.yaml index 12eb935f..6946ed00 100644 --- a/specs/shell/redirect_output_of_command_to_a_file_by_appending.yaml +++ b/specs/shell/redirect_output_of_command_to_a_file_by_appending.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/redirect_stderr.yaml b/specs/shell/redirect_stderr.yaml index 92b50398..ec4bdc28 100644 --- a/specs/shell/redirect_stderr.yaml +++ b/specs/shell/redirect_stderr.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/redirect_stdout.yaml b/specs/shell/redirect_stdout.yaml index 84ed269e..4b4cfee4 100644 --- a/specs/shell/redirect_stdout.yaml +++ b/specs/shell/redirect_stdout.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/LDP/abs/html/io-redirection.html" author: Mendel Cooper author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/shell_for_loop.yaml b/specs/shell/shell_for_loop.yaml index 3edad710..3a61ea43 100644 --- a/specs/shell/shell_for_loop.yaml +++ b/specs/shell/shell_for_loop.yaml @@ -18,5 +18,5 @@ source_url: "https://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html" author: Mike G author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/shell/shell_while_loop.yaml b/specs/shell/shell_while_loop.yaml index 12ac52f9..e101748b 100644 --- a/specs/shell/shell_while_loop.yaml +++ b/specs/shell/shell_while_loop.yaml @@ -15,5 +15,5 @@ source_url: "https://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html" author: Mike G author_url: ~ shells: - - Zsh - - Bash + - zsh + - bash \ No newline at end of file diff --git a/specs/zip/compress_subdirectories_under_folder.yaml b/specs/zip/compress_subdirectories_under_folder.yaml index 291be951..0b5a5cb8 100644 --- a/specs/zip/compress_subdirectories_under_folder.yaml +++ b/specs/zip/compress_subdirectories_under_folder.yaml @@ -24,4 +24,4 @@ source_url: "https://www.geeksforgeeks.org/zip-command-in-linux-with-examples/" author: funnyzak author_url: "https://github.com/funnyzak" shells: - - Bash \ No newline at end of file + - bash \ No newline at end of file From f8b7fed7b081ff469bcbe0231a069330b0158879 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Tue, 22 Aug 2023 22:13:08 +1000 Subject: [PATCH 07/10] fix(spec): use .yaml extension for all workflows --- .../{run_cookbook_manually.yml => run_cookbook_manually.yaml} | 0 specs/composer/{show_all_packages.yml => show_all_packages.yaml} | 0 ...show_all_packages_latest.yml => show_all_packages_latest.yaml} | 0 specs/composer/{update_packages.yml => update_packages.yaml} | 0 specs/du/{find_biggest_files.yml => find_biggest_files.yaml} | 0 ...licy_custom_id.yml => manually_initiate_policy_custom_id.yaml} | 0 ...rname.yml => manually_initiate_policy_custom_triggername.yaml} | 0 .../{manually_initiate_recon.yml => manually_initiate_recon.yaml} | 0 ...ion_key_generate.yml => laravel_application_key_generate.yaml} | 0 .../laravel/{laravel_cache_table.yml => laravel_cache_table.yaml} | 0 .../{laravel_config_cache.yml => laravel_config_cache.yaml} | 0 .../{laravel_config_clear.yml => laravel_config_clear.yaml} | 0 ...vel_create_new_project.yml => laravel_create_new_project.yaml} | 0 ...vel_custom_encrypt_key.yml => laravel_custom_encrypt_key.yaml} | 0 ...environment_file.yml => laravel_decrypt_environment_file.yaml} | 0 ...ith_key.yml => laravel_decrypt_environment_file_with_key.yaml} | 0 specs/laravel/{laravel_encrypt.yml => laravel_encrypt.yaml} | 0 .../laravel/{laravel_event_cache.yml => laravel_event_cache.yaml} | 0 .../laravel/{laravel_event_clear.yml => laravel_event_clear.yaml} | 0 .../{laravel_event_generate.yml => laravel_event_generate.yaml} | 0 .../laravel/{laravel_events_list.yml => laravel_events_list.yaml} | 0 .../{laravel_install_nova.yml => laravel_install_nova.yaml} | 0 .../{laravel_install_sail.yml => laravel_install_sail.yaml} | 0 .../{laravel_install_vapor.yml => laravel_install_vapor.yaml} | 0 specs/laravel/{laravel_installer.yml => laravel_installer.yaml} | 0 ...laravel_maintenance_down.yml => laravel_maintenance_down.yaml} | 0 ...nance_mode_bypass.yml => laravel_maintenance_mode_bypass.yaml} | 0 ...e_mode_disabled.yml => laravel_maintenance_mode_disabled.yaml} | 0 ...e_mode_redirect.yml => laravel_maintenance_mode_redirect.yaml} | 0 ...l_maintenance_refresh.yml => laravel_maintenance_refresh.yaml} | 0 specs/laravel/{laravel_migrate.yml => laravel_migrate.yaml} | 0 .../{laravel_migrate_fresh.yml => laravel_migrate_fresh.yaml} | 0 ...vel_migrate_fresh_seed.yml => laravel_migrate_fresh_seed.yaml} | 0 .../{laravel_migrate_pretend.yml => laravel_migrate_pretend.yaml} | 0 specs/laravel/{laravel_optimize.yml => laravel_optimize.yaml} | 0 ...rd.yml => connect_to_openfortivpn_with_one_time_password.yaml} | 0 specs/php/{php_server.yml => php_server.yaml} | 0 specs/php/{php_server_directory.yml => php_server_directory.yaml} | 0 specs/python/{start_server.yml => start_server.yaml} | 0 specs/python/{update_pip.yml => update_pip.yaml} | 0 .../ssl/{add_passwd_to_rsa_key.yml => add_passwd_to_rsa_key.yaml} | 0 specs/ssl/{check_web_certs.yml => check_web_certs.yaml} | 0 specs/ssl/{convert_der_to_pem.yml => convert_der_to_pem.yaml} | 0 specs/ssl/{convert_pem_to_der.yml => convert_pem_to_der.yaml} | 0 .../ssl/{convert_pem_to_pkcs12.yml => convert_pem_to_pkcs12.yaml} | 0 .../ssl/{convert_pkcs12_to_pem.yml => convert_pkcs12_to_pem.yaml} | 0 .../ssl/{export_public_rsa_key.yml => export_public_rsa_key.yaml} | 0 ...generate_csr_from_config.yml => generate_csr_from_config.yaml} | 0 specs/ssl/{generate_key.yml => generate_key.yaml} | 0 ...ve_passwd_from_rsa_key.yml => remove_passwd_from_rsa_key.yaml} | 0 ...ony_check_requirements.yml => symfony_check_requirements.yaml} | 0 .../{symfony_check_security.yml => symfony_check_security.yaml} | 0 ...ony_create_new_project.yml => symfony_create_new_project.yaml} | 0 .../{symfony_server_start.yml => symfony_server_start.yaml} | 0 specs/turborepo/{create-graph.yml => create-graph.yaml} | 0 specs/turborepo/{create-turborepo.yml => create-turborepo.yaml} | 0 .../{run-filtered-pipeline.yml => run-filtered-pipeline.yaml} | 0 specs/turborepo/{run-pipeline.yml => run-pipeline.yaml} | 0 58 files changed, 0 insertions(+), 0 deletions(-) rename specs/chef/{run_cookbook_manually.yml => run_cookbook_manually.yaml} (100%) rename specs/composer/{show_all_packages.yml => show_all_packages.yaml} (100%) rename specs/composer/{show_all_packages_latest.yml => show_all_packages_latest.yaml} (100%) rename specs/composer/{update_packages.yml => update_packages.yaml} (100%) rename specs/du/{find_biggest_files.yml => find_biggest_files.yaml} (100%) rename specs/jamf/{manually_initiate_policy_custom_id.yml => manually_initiate_policy_custom_id.yaml} (100%) rename specs/jamf/{manually_initiate_policy_custom_triggername.yml => manually_initiate_policy_custom_triggername.yaml} (100%) rename specs/jamf/{manually_initiate_recon.yml => manually_initiate_recon.yaml} (100%) rename specs/laravel/{laravel_application_key_generate.yml => laravel_application_key_generate.yaml} (100%) rename specs/laravel/{laravel_cache_table.yml => laravel_cache_table.yaml} (100%) rename specs/laravel/{laravel_config_cache.yml => laravel_config_cache.yaml} (100%) rename specs/laravel/{laravel_config_clear.yml => laravel_config_clear.yaml} (100%) rename specs/laravel/{laravel_create_new_project.yml => laravel_create_new_project.yaml} (100%) rename specs/laravel/{laravel_custom_encrypt_key.yml => laravel_custom_encrypt_key.yaml} (100%) rename specs/laravel/{laravel_decrypt_environment_file.yml => laravel_decrypt_environment_file.yaml} (100%) rename specs/laravel/{laravel_decrypt_environment_file_with_key.yml => laravel_decrypt_environment_file_with_key.yaml} (100%) rename specs/laravel/{laravel_encrypt.yml => laravel_encrypt.yaml} (100%) rename specs/laravel/{laravel_event_cache.yml => laravel_event_cache.yaml} (100%) rename specs/laravel/{laravel_event_clear.yml => laravel_event_clear.yaml} (100%) rename specs/laravel/{laravel_event_generate.yml => laravel_event_generate.yaml} (100%) rename specs/laravel/{laravel_events_list.yml => laravel_events_list.yaml} (100%) rename specs/laravel/{laravel_install_nova.yml => laravel_install_nova.yaml} (100%) rename specs/laravel/{laravel_install_sail.yml => laravel_install_sail.yaml} (100%) rename specs/laravel/{laravel_install_vapor.yml => laravel_install_vapor.yaml} (100%) rename specs/laravel/{laravel_installer.yml => laravel_installer.yaml} (100%) rename specs/laravel/{laravel_maintenance_down.yml => laravel_maintenance_down.yaml} (100%) rename specs/laravel/{laravel_maintenance_mode_bypass.yml => laravel_maintenance_mode_bypass.yaml} (100%) rename specs/laravel/{laravel_maintenance_mode_disabled.yml => laravel_maintenance_mode_disabled.yaml} (100%) rename specs/laravel/{laravel_maintenance_mode_redirect.yml => laravel_maintenance_mode_redirect.yaml} (100%) rename specs/laravel/{laravel_maintenance_refresh.yml => laravel_maintenance_refresh.yaml} (100%) rename specs/laravel/{laravel_migrate.yml => laravel_migrate.yaml} (100%) rename specs/laravel/{laravel_migrate_fresh.yml => laravel_migrate_fresh.yaml} (100%) rename specs/laravel/{laravel_migrate_fresh_seed.yml => laravel_migrate_fresh_seed.yaml} (100%) rename specs/laravel/{laravel_migrate_pretend.yml => laravel_migrate_pretend.yaml} (100%) rename specs/laravel/{laravel_optimize.yml => laravel_optimize.yaml} (100%) rename specs/openfortivpn/{connect_to_openfortivpn_with_one_time_password.yml => connect_to_openfortivpn_with_one_time_password.yaml} (100%) rename specs/php/{php_server.yml => php_server.yaml} (100%) rename specs/php/{php_server_directory.yml => php_server_directory.yaml} (100%) rename specs/python/{start_server.yml => start_server.yaml} (100%) rename specs/python/{update_pip.yml => update_pip.yaml} (100%) rename specs/ssl/{add_passwd_to_rsa_key.yml => add_passwd_to_rsa_key.yaml} (100%) rename specs/ssl/{check_web_certs.yml => check_web_certs.yaml} (100%) rename specs/ssl/{convert_der_to_pem.yml => convert_der_to_pem.yaml} (100%) rename specs/ssl/{convert_pem_to_der.yml => convert_pem_to_der.yaml} (100%) rename specs/ssl/{convert_pem_to_pkcs12.yml => convert_pem_to_pkcs12.yaml} (100%) rename specs/ssl/{convert_pkcs12_to_pem.yml => convert_pkcs12_to_pem.yaml} (100%) rename specs/ssl/{export_public_rsa_key.yml => export_public_rsa_key.yaml} (100%) rename specs/ssl/{generate_csr_from_config.yml => generate_csr_from_config.yaml} (100%) rename specs/ssl/{generate_key.yml => generate_key.yaml} (100%) rename specs/ssl/{remove_passwd_from_rsa_key.yml => remove_passwd_from_rsa_key.yaml} (100%) rename specs/symfony/{symfony_check_requirements.yml => symfony_check_requirements.yaml} (100%) rename specs/symfony/{symfony_check_security.yml => symfony_check_security.yaml} (100%) rename specs/symfony/{symfony_create_new_project.yml => symfony_create_new_project.yaml} (100%) rename specs/symfony/{symfony_server_start.yml => symfony_server_start.yaml} (100%) rename specs/turborepo/{create-graph.yml => create-graph.yaml} (100%) rename specs/turborepo/{create-turborepo.yml => create-turborepo.yaml} (100%) rename specs/turborepo/{run-filtered-pipeline.yml => run-filtered-pipeline.yaml} (100%) rename specs/turborepo/{run-pipeline.yml => run-pipeline.yaml} (100%) diff --git a/specs/chef/run_cookbook_manually.yml b/specs/chef/run_cookbook_manually.yaml similarity index 100% rename from specs/chef/run_cookbook_manually.yml rename to specs/chef/run_cookbook_manually.yaml diff --git a/specs/composer/show_all_packages.yml b/specs/composer/show_all_packages.yaml similarity index 100% rename from specs/composer/show_all_packages.yml rename to specs/composer/show_all_packages.yaml diff --git a/specs/composer/show_all_packages_latest.yml b/specs/composer/show_all_packages_latest.yaml similarity index 100% rename from specs/composer/show_all_packages_latest.yml rename to specs/composer/show_all_packages_latest.yaml diff --git a/specs/composer/update_packages.yml b/specs/composer/update_packages.yaml similarity index 100% rename from specs/composer/update_packages.yml rename to specs/composer/update_packages.yaml diff --git a/specs/du/find_biggest_files.yml b/specs/du/find_biggest_files.yaml similarity index 100% rename from specs/du/find_biggest_files.yml rename to specs/du/find_biggest_files.yaml diff --git a/specs/jamf/manually_initiate_policy_custom_id.yml b/specs/jamf/manually_initiate_policy_custom_id.yaml similarity index 100% rename from specs/jamf/manually_initiate_policy_custom_id.yml rename to specs/jamf/manually_initiate_policy_custom_id.yaml diff --git a/specs/jamf/manually_initiate_policy_custom_triggername.yml b/specs/jamf/manually_initiate_policy_custom_triggername.yaml similarity index 100% rename from specs/jamf/manually_initiate_policy_custom_triggername.yml rename to specs/jamf/manually_initiate_policy_custom_triggername.yaml diff --git a/specs/jamf/manually_initiate_recon.yml b/specs/jamf/manually_initiate_recon.yaml similarity index 100% rename from specs/jamf/manually_initiate_recon.yml rename to specs/jamf/manually_initiate_recon.yaml diff --git a/specs/laravel/laravel_application_key_generate.yml b/specs/laravel/laravel_application_key_generate.yaml similarity index 100% rename from specs/laravel/laravel_application_key_generate.yml rename to specs/laravel/laravel_application_key_generate.yaml diff --git a/specs/laravel/laravel_cache_table.yml b/specs/laravel/laravel_cache_table.yaml similarity index 100% rename from specs/laravel/laravel_cache_table.yml rename to specs/laravel/laravel_cache_table.yaml diff --git a/specs/laravel/laravel_config_cache.yml b/specs/laravel/laravel_config_cache.yaml similarity index 100% rename from specs/laravel/laravel_config_cache.yml rename to specs/laravel/laravel_config_cache.yaml diff --git a/specs/laravel/laravel_config_clear.yml b/specs/laravel/laravel_config_clear.yaml similarity index 100% rename from specs/laravel/laravel_config_clear.yml rename to specs/laravel/laravel_config_clear.yaml diff --git a/specs/laravel/laravel_create_new_project.yml b/specs/laravel/laravel_create_new_project.yaml similarity index 100% rename from specs/laravel/laravel_create_new_project.yml rename to specs/laravel/laravel_create_new_project.yaml diff --git a/specs/laravel/laravel_custom_encrypt_key.yml b/specs/laravel/laravel_custom_encrypt_key.yaml similarity index 100% rename from specs/laravel/laravel_custom_encrypt_key.yml rename to specs/laravel/laravel_custom_encrypt_key.yaml diff --git a/specs/laravel/laravel_decrypt_environment_file.yml b/specs/laravel/laravel_decrypt_environment_file.yaml similarity index 100% rename from specs/laravel/laravel_decrypt_environment_file.yml rename to specs/laravel/laravel_decrypt_environment_file.yaml diff --git a/specs/laravel/laravel_decrypt_environment_file_with_key.yml b/specs/laravel/laravel_decrypt_environment_file_with_key.yaml similarity index 100% rename from specs/laravel/laravel_decrypt_environment_file_with_key.yml rename to specs/laravel/laravel_decrypt_environment_file_with_key.yaml diff --git a/specs/laravel/laravel_encrypt.yml b/specs/laravel/laravel_encrypt.yaml similarity index 100% rename from specs/laravel/laravel_encrypt.yml rename to specs/laravel/laravel_encrypt.yaml diff --git a/specs/laravel/laravel_event_cache.yml b/specs/laravel/laravel_event_cache.yaml similarity index 100% rename from specs/laravel/laravel_event_cache.yml rename to specs/laravel/laravel_event_cache.yaml diff --git a/specs/laravel/laravel_event_clear.yml b/specs/laravel/laravel_event_clear.yaml similarity index 100% rename from specs/laravel/laravel_event_clear.yml rename to specs/laravel/laravel_event_clear.yaml diff --git a/specs/laravel/laravel_event_generate.yml b/specs/laravel/laravel_event_generate.yaml similarity index 100% rename from specs/laravel/laravel_event_generate.yml rename to specs/laravel/laravel_event_generate.yaml diff --git a/specs/laravel/laravel_events_list.yml b/specs/laravel/laravel_events_list.yaml similarity index 100% rename from specs/laravel/laravel_events_list.yml rename to specs/laravel/laravel_events_list.yaml diff --git a/specs/laravel/laravel_install_nova.yml b/specs/laravel/laravel_install_nova.yaml similarity index 100% rename from specs/laravel/laravel_install_nova.yml rename to specs/laravel/laravel_install_nova.yaml diff --git a/specs/laravel/laravel_install_sail.yml b/specs/laravel/laravel_install_sail.yaml similarity index 100% rename from specs/laravel/laravel_install_sail.yml rename to specs/laravel/laravel_install_sail.yaml diff --git a/specs/laravel/laravel_install_vapor.yml b/specs/laravel/laravel_install_vapor.yaml similarity index 100% rename from specs/laravel/laravel_install_vapor.yml rename to specs/laravel/laravel_install_vapor.yaml diff --git a/specs/laravel/laravel_installer.yml b/specs/laravel/laravel_installer.yaml similarity index 100% rename from specs/laravel/laravel_installer.yml rename to specs/laravel/laravel_installer.yaml diff --git a/specs/laravel/laravel_maintenance_down.yml b/specs/laravel/laravel_maintenance_down.yaml similarity index 100% rename from specs/laravel/laravel_maintenance_down.yml rename to specs/laravel/laravel_maintenance_down.yaml diff --git a/specs/laravel/laravel_maintenance_mode_bypass.yml b/specs/laravel/laravel_maintenance_mode_bypass.yaml similarity index 100% rename from specs/laravel/laravel_maintenance_mode_bypass.yml rename to specs/laravel/laravel_maintenance_mode_bypass.yaml diff --git a/specs/laravel/laravel_maintenance_mode_disabled.yml b/specs/laravel/laravel_maintenance_mode_disabled.yaml similarity index 100% rename from specs/laravel/laravel_maintenance_mode_disabled.yml rename to specs/laravel/laravel_maintenance_mode_disabled.yaml diff --git a/specs/laravel/laravel_maintenance_mode_redirect.yml b/specs/laravel/laravel_maintenance_mode_redirect.yaml similarity index 100% rename from specs/laravel/laravel_maintenance_mode_redirect.yml rename to specs/laravel/laravel_maintenance_mode_redirect.yaml diff --git a/specs/laravel/laravel_maintenance_refresh.yml b/specs/laravel/laravel_maintenance_refresh.yaml similarity index 100% rename from specs/laravel/laravel_maintenance_refresh.yml rename to specs/laravel/laravel_maintenance_refresh.yaml diff --git a/specs/laravel/laravel_migrate.yml b/specs/laravel/laravel_migrate.yaml similarity index 100% rename from specs/laravel/laravel_migrate.yml rename to specs/laravel/laravel_migrate.yaml diff --git a/specs/laravel/laravel_migrate_fresh.yml b/specs/laravel/laravel_migrate_fresh.yaml similarity index 100% rename from specs/laravel/laravel_migrate_fresh.yml rename to specs/laravel/laravel_migrate_fresh.yaml diff --git a/specs/laravel/laravel_migrate_fresh_seed.yml b/specs/laravel/laravel_migrate_fresh_seed.yaml similarity index 100% rename from specs/laravel/laravel_migrate_fresh_seed.yml rename to specs/laravel/laravel_migrate_fresh_seed.yaml diff --git a/specs/laravel/laravel_migrate_pretend.yml b/specs/laravel/laravel_migrate_pretend.yaml similarity index 100% rename from specs/laravel/laravel_migrate_pretend.yml rename to specs/laravel/laravel_migrate_pretend.yaml diff --git a/specs/laravel/laravel_optimize.yml b/specs/laravel/laravel_optimize.yaml similarity index 100% rename from specs/laravel/laravel_optimize.yml rename to specs/laravel/laravel_optimize.yaml diff --git a/specs/openfortivpn/connect_to_openfortivpn_with_one_time_password.yml b/specs/openfortivpn/connect_to_openfortivpn_with_one_time_password.yaml similarity index 100% rename from specs/openfortivpn/connect_to_openfortivpn_with_one_time_password.yml rename to specs/openfortivpn/connect_to_openfortivpn_with_one_time_password.yaml diff --git a/specs/php/php_server.yml b/specs/php/php_server.yaml similarity index 100% rename from specs/php/php_server.yml rename to specs/php/php_server.yaml diff --git a/specs/php/php_server_directory.yml b/specs/php/php_server_directory.yaml similarity index 100% rename from specs/php/php_server_directory.yml rename to specs/php/php_server_directory.yaml diff --git a/specs/python/start_server.yml b/specs/python/start_server.yaml similarity index 100% rename from specs/python/start_server.yml rename to specs/python/start_server.yaml diff --git a/specs/python/update_pip.yml b/specs/python/update_pip.yaml similarity index 100% rename from specs/python/update_pip.yml rename to specs/python/update_pip.yaml diff --git a/specs/ssl/add_passwd_to_rsa_key.yml b/specs/ssl/add_passwd_to_rsa_key.yaml similarity index 100% rename from specs/ssl/add_passwd_to_rsa_key.yml rename to specs/ssl/add_passwd_to_rsa_key.yaml diff --git a/specs/ssl/check_web_certs.yml b/specs/ssl/check_web_certs.yaml similarity index 100% rename from specs/ssl/check_web_certs.yml rename to specs/ssl/check_web_certs.yaml diff --git a/specs/ssl/convert_der_to_pem.yml b/specs/ssl/convert_der_to_pem.yaml similarity index 100% rename from specs/ssl/convert_der_to_pem.yml rename to specs/ssl/convert_der_to_pem.yaml diff --git a/specs/ssl/convert_pem_to_der.yml b/specs/ssl/convert_pem_to_der.yaml similarity index 100% rename from specs/ssl/convert_pem_to_der.yml rename to specs/ssl/convert_pem_to_der.yaml diff --git a/specs/ssl/convert_pem_to_pkcs12.yml b/specs/ssl/convert_pem_to_pkcs12.yaml similarity index 100% rename from specs/ssl/convert_pem_to_pkcs12.yml rename to specs/ssl/convert_pem_to_pkcs12.yaml diff --git a/specs/ssl/convert_pkcs12_to_pem.yml b/specs/ssl/convert_pkcs12_to_pem.yaml similarity index 100% rename from specs/ssl/convert_pkcs12_to_pem.yml rename to specs/ssl/convert_pkcs12_to_pem.yaml diff --git a/specs/ssl/export_public_rsa_key.yml b/specs/ssl/export_public_rsa_key.yaml similarity index 100% rename from specs/ssl/export_public_rsa_key.yml rename to specs/ssl/export_public_rsa_key.yaml diff --git a/specs/ssl/generate_csr_from_config.yml b/specs/ssl/generate_csr_from_config.yaml similarity index 100% rename from specs/ssl/generate_csr_from_config.yml rename to specs/ssl/generate_csr_from_config.yaml diff --git a/specs/ssl/generate_key.yml b/specs/ssl/generate_key.yaml similarity index 100% rename from specs/ssl/generate_key.yml rename to specs/ssl/generate_key.yaml diff --git a/specs/ssl/remove_passwd_from_rsa_key.yml b/specs/ssl/remove_passwd_from_rsa_key.yaml similarity index 100% rename from specs/ssl/remove_passwd_from_rsa_key.yml rename to specs/ssl/remove_passwd_from_rsa_key.yaml diff --git a/specs/symfony/symfony_check_requirements.yml b/specs/symfony/symfony_check_requirements.yaml similarity index 100% rename from specs/symfony/symfony_check_requirements.yml rename to specs/symfony/symfony_check_requirements.yaml diff --git a/specs/symfony/symfony_check_security.yml b/specs/symfony/symfony_check_security.yaml similarity index 100% rename from specs/symfony/symfony_check_security.yml rename to specs/symfony/symfony_check_security.yaml diff --git a/specs/symfony/symfony_create_new_project.yml b/specs/symfony/symfony_create_new_project.yaml similarity index 100% rename from specs/symfony/symfony_create_new_project.yml rename to specs/symfony/symfony_create_new_project.yaml diff --git a/specs/symfony/symfony_server_start.yml b/specs/symfony/symfony_server_start.yaml similarity index 100% rename from specs/symfony/symfony_server_start.yml rename to specs/symfony/symfony_server_start.yaml diff --git a/specs/turborepo/create-graph.yml b/specs/turborepo/create-graph.yaml similarity index 100% rename from specs/turborepo/create-graph.yml rename to specs/turborepo/create-graph.yaml diff --git a/specs/turborepo/create-turborepo.yml b/specs/turborepo/create-turborepo.yaml similarity index 100% rename from specs/turborepo/create-turborepo.yml rename to specs/turborepo/create-turborepo.yaml diff --git a/specs/turborepo/run-filtered-pipeline.yml b/specs/turborepo/run-filtered-pipeline.yaml similarity index 100% rename from specs/turborepo/run-filtered-pipeline.yml rename to specs/turborepo/run-filtered-pipeline.yaml diff --git a/specs/turborepo/run-pipeline.yml b/specs/turborepo/run-pipeline.yaml similarity index 100% rename from specs/turborepo/run-pipeline.yml rename to specs/turborepo/run-pipeline.yaml From 6152e0584e9cec215888b9d443d37ca8c84c928f Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Wed, 23 Aug 2023 11:49:36 +1000 Subject: [PATCH 08/10] feat(script): install JSON schema validator --- script/bootstrap | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 6c7328a8..3f9174fc 100644 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,19 +2,28 @@ set -e -if ! command -v brew; then - echo "Installing brew..." - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - echo "Please make sure brew is set correctly in your PATH" - exit 1 -fi - -if ! command -v cargo; then - echo "Installing rust..." - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - echo "Please start a new terminal session so that cargo is in your PATH" - exit 1 -fi +reset='\e[0m' +red='\e[31m' +green='\e[32m' +cyan='\e[36m' + +install_dependency() { + id_dependency="$1" + id_description="$2" + id_installation_command="$3" + + if ! command -v "$id_dependency" > /dev/null; then + printf "${green}Installing '$red%s$green' ('$cyan%s$green' binary)\n$reset" "$id_description" "$id_dependency" + sh -c "$id_installation_command" + printf "${green}Installed '$cyan%s$green' successfully. +Please make sure '$cyan%s$green' binary is in your \$PATH.\n$reset" "$id_dependency" "$id_dependency" + exit 1 + fi +} + +# shellcheck disable=SC2016 +install_dependency brew Homebrew '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"' +install_dependency rustc Rust 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh' cargo install cargo-bundle cargo install cargo-diff-tools --git https://github.com/warpdotdev/cargo-diff-tools @@ -23,3 +32,6 @@ cargo install cargo-diff-tools --git https://github.com/warpdotdev/cargo-diff-to brew update rustup component add clippy + +install_dependency python3-pip 'Python package manager' 'sudo apt install python3-pip' +install_dependency jsonschema-cli 'JSON schema validator' 'pip3 install jsonschema-cli' From 5a73116f123b524960285ccf47dfbe1af6bd482a Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Wed, 23 Aug 2023 11:52:17 +1000 Subject: [PATCH 09/10] feat(script): validate YAML files in presubmit --- script/presubmit | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/script/presubmit b/script/presubmit index ed696155..127186a8 100755 --- a/script/presubmit +++ b/script/presubmit @@ -1,17 +1,18 @@ -#!/bin/bash +#!/bin/sh # Script to run presubmit checks. Devs can run this script locally before sending out PRs for review to ensure # CI is passing for their PR. set -e cd "$(dirname "$0")/.." - +export -f f FMT_COMMAND="cargo fmt" echo "Running $FMT_COMMAND..." set -e EXIT_CODE=0 +# shellcheck enable=SC2000 $FMT_COMMAND -- --check || EXIT_CODE=$? -if [[ $EXIT_CODE -ne 0 ]]; then +if [ $EXIT_CODE -ne 0 ]; then echo 'Run `'$FMT_COMMAND'` to fix.' exit $EXIT_CODE fi @@ -28,4 +29,9 @@ echo "Running cargo test..." cargo test echo "Tests succeeded..." +for file in specs/*/*.yaml; do + echo "Validating '$file'..." + jsonschema-cli validate ./schemas/workflow.json "$file" +done + echo "Congrats! All presubmits checks passed." From c14bb4862d2f6e73506a549c0f3a413573b5978c Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Wed, 23 Aug 2023 11:52:33 +1000 Subject: [PATCH 10/10] feat(ci): simplify --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index be1dc333..8459d248 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,8 +47,7 @@ jobs: - name: Run jsonschema-cli validate run: | - shopt -s extglob - for file in specs/**/*.yaml; do + for file in specs/*/*.yaml; do echo "Validating '$file'..." jsonschema-cli validate ./schemas/workflow.json "$file" done