Skip to content

Commit c889616

Browse files
committed
Clean up packaging the VS Code vsix
Fix image URLs and add new commands: * npm run vsix-pack * npm run vsix-install
1 parent ea40f55 commit c889616

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Pack VSCode Extension
6262
working-directory: msbuild-editor-vscode
63-
run: npx vsce package --no-git-tag-version --pre-release ${{ steps.nbgv.outputs.NpmPackageVersion }}
63+
run: npm run vsix-pack
6464

6565
- uses: actions/upload-artifact@v4
6666
if: startsWith(matrix.os, 'windows')

msbuild-editor-vscode/.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ src/**
1515
# are correct when the README.md is viewed in the repo. however, they
1616
# are not needed in the vsix as README.md in the generated package
1717
# has the paths rewritten to https URLs to the GitHub repo
18-
/images/**
18+
images/**

msbuild-editor-vscode/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"author": {
99
"name": "Mikayla Hutchinson"
1010
},
11-
"icon": "images/icon.png",
11+
"icon": "icon.png",
1212
"repository": {
1313
"type": "git",
1414
"url": "https://github.com/mhutch/MonoDevelop.MSBuildEditor.git"
@@ -39,7 +39,9 @@
3939
"lint": "eslint src --ext ts",
4040
"test": "vscode-test",
4141
"publish-server": "dotnet publish ../MSBuildLanguageServer/MSBuildLanguageServer.csproj --configuration Debug --output ./server",
42-
"copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png"
42+
"copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png",
43+
"vsix-pack": "pwsh -c \"vsce package --baseImagesUrl https://github.com/mhutch/MonoDevelop.MSBuildEditor/raw/HEAD/msbuild-editor-vscode --no-update-package-json --no-git-tag-version --pre-release $(nbgv get-version -v NpmPackageVersion)\"",
44+
"vsix-install": "pwsh -c \"npm run vsix-pack && code --install-extension msbuild-editor-$(nbgv get-version -v NpmPackageVersion).vsix\""
4345
},
4446
"dependencies": {
4547
"@vscode/extension-telemetry": "^0.9.0",

0 commit comments

Comments
 (0)