From 6db8ce01b7e48dbec434668ea75ad1499411af83 Mon Sep 17 00:00:00 2001 From: Calvin Wilkinson Date: Thu, 24 Aug 2023 12:10:28 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7Fix=20arg=20processing=20bug=20(#15?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Start work for issue #156 * ide: alphabatize launch configs * fix: fix bug with mutating incoming args for transpile readme process * ci: update reusable workflow references --- .github/workflows/add-new-item-to-project.yml | 2 +- .github/workflows/build-csharp-project.yml | 2 +- .github/workflows/docusaurus-release.yml | 1 + .github/workflows/dotnet-action-release.yml | 10 +- .github/workflows/dotnet-lib-release.yml | 14 +- .github/workflows/run-csharp-tests.yml | 2 +- .vscode/launch.json | 266 +++++++++--------- cicd/scripts/runners/TranspileReadMeRunner.ts | 5 +- 8 files changed, 152 insertions(+), 150 deletions(-) diff --git a/.github/workflows/add-new-item-to-project.yml b/.github/workflows/add-new-item-to-project.yml index 1d9d38d9..f63a1654 100644 --- a/.github/workflows/add-new-item-to-project.yml +++ b/.github/workflows/add-new-item-to-project.yml @@ -36,7 +36,7 @@ jobs: add_new_item_to_project: name: Add New Issue needs: item_number - uses: KinsonDigital/Infrastructure/.github/workflows/add-item-to-project.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/add-item-to-project.yml@v12.1.1 with: org-name: "${{ vars.ORGANIZATION_NAME }}" org-project-name: "${{ vars.ORG_PROJECT_NAME }}" diff --git a/.github/workflows/build-csharp-project.yml b/.github/workflows/build-csharp-project.yml index 18a1fc18..ae4f0ac5 100644 --- a/.github/workflows/build-csharp-project.yml +++ b/.github/workflows/build-csharp-project.yml @@ -70,7 +70,7 @@ jobs: resolve_proj_file_path: name: Resolving ${{ inputs.project-name }} Project File Path needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/resolve-csharp-proj-file.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/resolve-csharp-proj-file.yml@v12.1.1 with: project-name: ${{ inputs.project-name }} base-path: ${{ inputs.base-path }} diff --git a/.github/workflows/docusaurus-release.yml b/.github/workflows/docusaurus-release.yml index 991aadc7..c0875bad 100644 --- a/.github/workflows/docusaurus-release.yml +++ b/.github/workflows/docusaurus-release.yml @@ -46,6 +46,7 @@ on: type: string + permissions: contents: write pages: write diff --git a/.github/workflows/dotnet-action-release.yml b/.github/workflows/dotnet-action-release.yml index 9ad39ecd..4d0c9cd3 100644 --- a/.github/workflows/dotnet-action-release.yml +++ b/.github/workflows/dotnet-action-release.yml @@ -157,7 +157,7 @@ jobs: validate_version: name: Validate Version needs: [print_validate_workflow, validate_branch] - uses: KinsonDigital/Infrastructure/.github/workflows/validate-csharp-version.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-csharp-version.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" release-type: "${{ inputs.release-type }}" @@ -168,7 +168,7 @@ jobs: validate_tag: name: Validate Tag needs: validate_version - uses: KinsonDigital/Infrastructure/.github/workflows/validate-tag.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-tag.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" release-type: "${{ inputs.release-type }}" @@ -207,7 +207,7 @@ jobs: validate_github_release: name: GitHub Release Does Not Exist needs: validate_version - uses: KinsonDigital/Infrastructure/.github/workflows/validate-github-release.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-github-release.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" version: "${{ needs.validate_version.outputs.version }}" @@ -218,7 +218,7 @@ jobs: build_project: name: Build Main Project (${{ inputs.project-name }}) needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" runs-on: "${{ inputs.runs-on }}" @@ -229,7 +229,7 @@ jobs: run_tests: name: Run Tests needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}Tests" runs-on: "${{ inputs.runs-on }}" diff --git a/.github/workflows/dotnet-lib-release.yml b/.github/workflows/dotnet-lib-release.yml index 36c37b73..39d2018a 100644 --- a/.github/workflows/dotnet-lib-release.yml +++ b/.github/workflows/dotnet-lib-release.yml @@ -182,7 +182,7 @@ jobs: validate_version: name: Validate Version - uses: KinsonDigital/Infrastructure/.github/workflows/validate-csharp-version.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-csharp-version.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" release-type: "${{ inputs.release-type }}" @@ -193,7 +193,7 @@ jobs: validate_tag: name: Validate Tag needs: validate_version - uses: KinsonDigital/Infrastructure/.github/workflows/validate-tag.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-tag.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" release-type: "${{ inputs.release-type }}" @@ -205,7 +205,7 @@ jobs: nuget_pkg_does_not_exist: name: Validate NuGet Package Does Not Exist needs: validate_version - uses: KinsonDigital/Infrastructure/.github/workflows/nuget-package-does-not-exist.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/nuget-package-does-not-exist.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" version: "${{ needs.validate_version.outputs.version }}" @@ -214,7 +214,7 @@ jobs: validate_milestone_status: name: Validate Milestone Status needs: validate_version - uses: KinsonDigital/Infrastructure/.github/workflows/validate-milestone-status.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-milestone-status.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" version: "${{ needs.validate_version.outputs.version }}" @@ -225,7 +225,7 @@ jobs: validate_github_release: name: GitHub Release Does Not Exist needs: [validate_version] - uses: KinsonDigital/Infrastructure/.github/workflows/validate-github-release.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/validate-github-release.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" version: "${{ needs.validate_version.outputs.version }}" @@ -236,7 +236,7 @@ jobs: build_project: name: Build Main Project needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}" runs-on: "${{ inputs.runs-on }}" @@ -247,7 +247,7 @@ jobs: run_tests: name: Run Tests needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v12.1.1 with: project-name: "${{ inputs.project-name }}Tests" runs-on: "${{ inputs.runs-on }}" diff --git a/.github/workflows/run-csharp-tests.yml b/.github/workflows/run-csharp-tests.yml index d3d8a245..b399f493 100644 --- a/.github/workflows/run-csharp-tests.yml +++ b/.github/workflows/run-csharp-tests.yml @@ -72,7 +72,7 @@ jobs: resolve_proj_file_path: name: Resolving ${{ inputs.project-name }} Project File Path needs: print_validate_workflow - uses: KinsonDigital/Infrastructure/.github/workflows/resolve-csharp-proj-file.yml@v12.1.0 + uses: KinsonDigital/Infrastructure/.github/workflows/resolve-csharp-proj-file.yml@v12.1.1 with: project-name: ${{ inputs.project-name }} base-path: ${{ inputs.base-path }} diff --git a/.vscode/launch.json b/.vscode/launch.json index 06175b9d..de2ca644 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Playground (DEBUG)", + "name": "Playground", "request": "launch", "type": "node", "program": "${workspaceFolder}/cicd/playground.ts", @@ -28,19 +28,24 @@ } }, { - "name": "Validate Prod Tag (DEBUG)", + "name": "Add Issue To Project", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", - "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/cicd/scripts/add-item-to-project.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": ["Production", "v1.2.3", "PackageMonster"], + "args": [ + "Infrastructure", + "24", + "pr", + "KD-Team", + "${env:CICD_TOKEN}", + ], "attachSimplePort": 9229, - "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -48,41 +53,50 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Validate Preview Tag (DEBUG)", + { + "name": "Add Item To Project", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", + "program": "${workspaceFolder}/cicd/scripts/add-item-to-project.ts", "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": ["Preview", "v1.2.3-preview.5", "PackageMonster"], + "args": [ + "KinsonDigital", + "KD-Team", + "Velaptor", + "683", + "${env:CICD_TOKEN}", + ], "attachSimplePort": 9229, - "console": "integratedTerminal", + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, "linux": { "runtimeExecutable": "${userHome}/.deno/bin/deno" } - }, + }, { - "name": "Validate Either Tag (DEBUG)", + "name": "Close Milestone", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", - "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/cicd/scripts/close-milestone.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": ["Either", "v1.2.3", "PackageMonster"], + "args": [ + "Infrastructure", + "v1.2.3-preview.4", + "${env:CICD_TOKEN}", + ], "attachSimplePort": 9229, - "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -90,12 +104,12 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Milestone Exists (DEBUG)", + { + "name": "GitHub Release Does Not Exist", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/milestone-exists.ts", - "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/cicd/scripts/github-release-does-not-exist.ts", + "cwd": "${workspaceFolder}/cicd/scripts", "runtimeArgs": [ "run", "--inspect-wait", @@ -103,11 +117,10 @@ ], "args": [ "Infrastructure", - "v1.2.3-preview.4", + "v1.0.0-preview.10", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, - "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -116,7 +129,7 @@ } }, { - "name": "Label If Head Branch (DEBUG)", + "name": "Label If Head Branch", "request": "launch", "type": "node", "program": "${workspaceFolder}/cicd/scripts/label-if-head-branch.ts", @@ -136,11 +149,11 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Validate Release Notes (DEBUG)", + { + "name": "Milestone Exists", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/validate-release-notes.ts", + "program": "${workspaceFolder}/cicd/scripts/milestone-exists.ts", "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", @@ -148,13 +161,12 @@ "--allow-all" ], "args": [ - "KinsonDigital", "Infrastructure", - "preview", - "v1.0.0-preview.1", + "v1.2.3-preview.4", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -162,24 +174,18 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Add Issue To Project (DEBUG)", + { + "name": "NuGet Package Exists", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/add-item-to-project.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/cicd/scripts/nuget-pkg-exists.ts", + "cwd": "${workspaceFolder}/cicd/scripts", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": [ - "Infrastructure", - "24", - "pr", - "KD-Team", - "${env:CICD_TOKEN}", - ], + "args": ["KinsonDigital.Velaptor"], "attachSimplePort": 9229, "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" @@ -188,11 +194,11 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Close Milestone (DEBUG)", + { + "name": "Prepare Release", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/close-milestone.ts", + "program": "${workspaceFolder}/cicd/scripts/prepare-release.ts", "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", @@ -200,8 +206,10 @@ "--allow-all" ], "args": [ - "Infrastructure", - "v1.2.3-preview.4", + "KinsonDigital", + "CASL", + "preview", + "v1.0.0-preview.15", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -213,17 +221,26 @@ } }, { - "name": "Validate Version (DEBUG)", + "name": "Send Release Tweet", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/validate-version.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/cicd/scripts/send-release-tweet.ts", + "cwd": "${workspaceFolder}/cicd/scripts", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": ["v1.2.3-preview.4", "preview"], + "args": [ + "KinsonDigital", + "Infrastructure", + "v1.0.0-preview.15", + "${env:TWITTER_CONSUMER_API_KEY}", + "${env:TWITTER_CONSUMER_API_SECRET}", + "${env:TWITTER_ACCESS_TOKEN_KEY}", + "${env:TWITTER_ACCESS_TOKEN_SECRET}", + "${env:CICD_TOKEN}", + ], "attachSimplePort": 9229, "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" @@ -233,11 +250,11 @@ } }, { - "name": "Send Release Tweet (DEBUG)", + "name": "Sync Bot", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/send-release-tweet.ts", - "cwd": "${workspaceFolder}/cicd/scripts", + "program": "${workspaceFolder}/cicd/scripts/sync-bot-status-check.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", @@ -246,11 +263,8 @@ "args": [ "KinsonDigital", "Infrastructure", - "v1.0.0-preview.15", - "${env:TWITTER_CONSUMER_API_KEY}", - "${env:TWITTER_CONSUMER_API_SECRET}", - "${env:TWITTER_ACCESS_TOKEN_KEY}", - "${env:TWITTER_ACCESS_TOKEN_SECRET}", + "93", + "issue", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -262,17 +276,23 @@ } }, { - "name": "NuGet Package Exists (DEBUG)", + "name": "Sync Issue To PR", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/nuget-pkg-exists.ts", - "cwd": "${workspaceFolder}/cicd/scripts", + "program": "${workspaceFolder}/cicd/scripts/sync-issue-to-pr.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": ["KinsonDigital.Velaptor"], + "args": [ + "KinsonDigital", + "Infrastructure", + "CalvinWilkinson", + "93", + "${env:CICD_TOKEN}", + ], "attachSimplePort": 9229, "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" @@ -282,19 +302,21 @@ } }, { - "name": "GitHub Release Does Not Exist (DEBUG)", + "name": "Sync Status Check", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/github-release-does-not-exist.ts", - "cwd": "${workspaceFolder}/cicd/scripts", + "program": "${workspaceFolder}/cicd/scripts/sync-bot-status-check.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], "args": [ + "KinsonDigital", "Infrastructure", - "v1.0.0-preview.10", + "94", + "pr", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -306,10 +328,10 @@ } }, { - "name": "Sync Bot (DEBUG)", + "name": "Transpile README", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/sync-issue-to-pr.ts", + "program": "${workspaceFolder}/cicd/scripts/transpile-readme.ts", "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", @@ -317,10 +339,7 @@ "--allow-all" ], "args": [ - "KinsonDigital", - "Infrastructure", - "CalvinWilkinson", - "93", + "${workspaceFolder}", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -332,10 +351,10 @@ } }, { - "name": "Sync Status Check (DEBUG)", + "name": "Update CSharp File", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/sync-bot-status-check.ts", + "program": "${workspaceFolder}/cicd/scripts/update-csharp-proj.ts", "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", @@ -343,10 +362,8 @@ "--allow-all" ], "args": [ - "KinsonDigital", - "Infrastructure", - "94", - "pr", + "${workspaceFolder}/cicd/test-data/sample-csharp-proj-file.csproj", + "v1.0.0-preview.1", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -358,24 +375,22 @@ } }, { - "name": "Sync Bot (DEBUG)", + "name": "Update Workflow Versions", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/sync-bot-status-check.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/.github/internal-cicd/update-workflow-versions.ts", + "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], "args": [ - "KinsonDigital", - "Infrastructure", - "93", - "issue", + "${workspaceFolder}/.github/workflows", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -384,18 +399,18 @@ } }, { - "name": "Transpile README (DEBUG)", + "name": "Workflow Version Status Check", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/transpile-readme.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/.github/internal-cicd/workflow-version-status-check.ts", + "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], "args": [ - "${workspaceFolder}", + "${workspaceFolder}/.github/workflows", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, @@ -406,25 +421,20 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Prepare Release (DEBUG)", + { + "name": "Validate Either Tag", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/prepare-release.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", + "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": [ - "KinsonDigital", - "CASL", - "preview", - "v1.0.0-preview.15", - "${env:CICD_TOKEN}", - ], + "args": ["Either", "v1.2.3", "PackageMonster"], "attachSimplePort": 9229, + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -432,23 +442,20 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Update CSharp File (DEBUG)", + { + "name": "Validate Preview Tag", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/update-csharp-proj.ts", - "cwd": "${workspaceFolder}/cicd", + "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", + "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": [ - "${workspaceFolder}/cicd/test-data/sample-csharp-proj-file.csproj", - "v1.0.0-preview.1", - "${env:CICD_TOKEN}", - ], + "args": ["Preview", "v1.2.3-preview.5", "PackageMonster"], "attachSimplePort": 9229, + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -456,22 +463,20 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Workflow Version Status Check (DEBUG)", + { + "name": "Validate Prod Tag", "request": "launch", "type": "node", - "program": "${workspaceFolder}/.github/internal-cicd/workflow-version-status-check.ts", + "program": "${workspaceFolder}/cicd/scripts/validate-tag.ts", "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": [ - "${workspaceFolder}/.github/workflows", - "${env:CICD_TOKEN}", - ], + "args": ["Production", "v1.2.3", "PackageMonster"], "attachSimplePort": 9229, + "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -479,11 +484,11 @@ "runtimeExecutable": "${userHome}/.deno/bin/deno" } }, - { - "name": "Update Workflow Versions (DEBUG)", + { + "name": "Validate Release Notes", "request": "launch", "type": "node", - "program": "${workspaceFolder}/.github/internal-cicd/update-workflow-versions.ts", + "program": "${workspaceFolder}/cicd/scripts/validate-release-notes.ts", "cwd": "${workspaceFolder}", "runtimeArgs": [ "run", @@ -491,11 +496,13 @@ "--allow-all" ], "args": [ - "${workspaceFolder}/.github/workflows", + "KinsonDigital", + "Infrastructure", + "preview", + "v1.0.0-preview.1", "${env:CICD_TOKEN}", ], "attachSimplePort": 9229, - "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, @@ -504,31 +511,24 @@ } }, { - "name": "Add Item To Project (DEBUG)", + "name": "Validate Version", "request": "launch", "type": "node", - "program": "${workspaceFolder}/cicd/scripts/add-item-to-project.ts", - "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/cicd/scripts/validate-version.ts", + "cwd": "${workspaceFolder}/cicd", "runtimeArgs": [ "run", "--inspect-wait", "--allow-all" ], - "args": [ - "KinsonDigital", - "KD-Team", - "Velaptor", - "683", - "${env:CICD_TOKEN}", - ], + "args": ["v1.2.3-preview.4", "preview"], "attachSimplePort": 9229, - "console": "integratedTerminal", "windows": { "runtimeExecutable": "${userHome}\\.deno\\bin\\deno.exe" }, "linux": { "runtimeExecutable": "${userHome}/.deno/bin/deno" } - } + }, ] } diff --git a/cicd/scripts/runners/TranspileReadMeRunner.ts b/cicd/scripts/runners/TranspileReadMeRunner.ts index e56e3407..2960de07 100644 --- a/cicd/scripts/runners/TranspileReadMeRunner.ts +++ b/cicd/scripts/runners/TranspileReadMeRunner.ts @@ -105,10 +105,11 @@ export class TranspileReadMeRunner extends ScriptRunner { * @inheritdoc */ protected mutateArgs(args: string[]): string[] { - let dirPath = Utils.normalizePath(args[0]); + let [dirPath, token] = args; + dirPath = Utils.normalizePath(args[0]); dirPath = Utils.trimAllEndingValue(dirPath, "/"); - return [dirPath]; + return [dirPath, token]; } /**