From d059e470ffe2ccf30513c97f7674ab867fa95e2b Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 26 Aug 2024 19:14:35 +0100 Subject: [PATCH 1/4] Change extensionPack to extensionDependencies, to fix uninstall issues Breaks usage from OpenVSX, as the dependencies aren't available there --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4250dc1..2a7da0e 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "Snippets", "Other" ], - "extensionPack": [ + "extensionDependencies": [ "marus25.cortex-debug", "ms-vscode.cpptools", "ms-vscode.cpptools-extension-pack", From 3cb647261f77242a460800540939bd612f69a2cd Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 26 Aug 2024 19:41:51 +0100 Subject: [PATCH 2/4] Build separate .vsix files for OpenVSX --- .github/workflows/release.yml | 18 +++++++++++++++--- package.json | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d509e59..c797ebc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,14 @@ jobs: run: | yarn lint vsce package + - name: Modify package.json for OVSX + # ms-vscode extensions not available on OpenVSX registry, so remove dependencies + run: | + sed -i 's/\n\s"ms-vscode.*",//g' package.json + - name: Package Extension for OVSX + run: | + yarn lint + vsce package -o ovsx-raspberry-pi-pico.vsix - name: Test PAT if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} env: @@ -43,12 +51,16 @@ jobs: uses: actions/upload-artifact@v4 with: name: raspberry-pi-pico - path: raspberry-pi-pico-*.vsix + path: | + raspberry-pi-pico-*.vsix + ovsx-raspberry-pi-pico.vsix - name: Add Release Asset uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: - files: raspberry-pi-pico-*.vsix + files: | + raspberry-pi-pico-*.vsix + ovsx-raspberry-pi-pico.vsix - name: Publish Extension if: startsWith(github.ref, 'refs/tags/') env: @@ -58,4 +70,4 @@ jobs: - name: Publish Extension to OVSX if: startsWith(github.ref, 'refs/tags/') run: | - npx ovsx publish raspberry-pi-pico-*.vsix -p ${{ secrets.OPEN_VSX_PAT }} + npx ovsx publish ovsx-raspberry-pi-pico.vsix -p ${{ secrets.OPEN_VSX_PAT }} diff --git a/package.json b/package.json index 2a7da0e..0c1164e 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,10 @@ "Other" ], "extensionDependencies": [ - "marus25.cortex-debug", "ms-vscode.cpptools", "ms-vscode.cpptools-extension-pack", - "ms-vscode.vscode-serial-monitor" + "ms-vscode.vscode-serial-monitor", + "marus25.cortex-debug" ], "main": "./dist/extension.cjs", "markdown": "github", From bc8f77cc0956077ba9ab51c450d8633d65d49955 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 26 Aug 2024 20:06:35 +0100 Subject: [PATCH 3/4] Only run `yarn lint` once --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c797ebc..f32eb06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,6 @@ jobs: sed -i 's/\n\s"ms-vscode.*",//g' package.json - name: Package Extension for OVSX run: | - yarn lint vsce package -o ovsx-raspberry-pi-pico.vsix - name: Test PAT if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} From 7e7b4359f2d4979e5bd616a6241b4403dddfa1e3 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 26 Aug 2024 20:17:29 +0100 Subject: [PATCH 4/4] Fix sed command --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f32eb06..c6b8cec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - name: Modify package.json for OVSX # ms-vscode extensions not available on OpenVSX registry, so remove dependencies run: | - sed -i 's/\n\s"ms-vscode.*",//g' package.json + sed -i 's/"ms-vscode.*",//g' package.json - name: Package Extension for OVSX run: | vsce package -o ovsx-raspberry-pi-pico.vsix