Skip to content

Commit

Permalink
Repeatable install commands (#192)
Browse files Browse the repository at this point in the history
* Use `(<code>)` which calls a subshell to run the code, allowing `cd` to not change the callers working directory.
* Use `|| true` as the first time ran, there are no files to remove and `zsh` throws an error.
* Use `npx @vscode/vsce` to auto install `vsce`. When calling `npx vsce` directly, a warning is displayed to upgrade to `@vscode/vsce`.
  • Loading branch information
schloerke authored Jan 21, 2025
1 parent 3eb5694 commit 3144e85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

# Build the extension.
- name: Package Extension (release)
run: npx vsce package -o "./dist/air-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
run: npx @vscode/vsce package -o "./dist/air-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}

# Upload the extension.
- name: Upload artifacts
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:

# Publish to the Code Marketplace.
- name: Publish Extension (Code Marketplace, release)
run: npx vsce publish --pat ${{ secrets.VSCE_PAT }} --packagePath ./dist/air-*.vsix
run: npx @vscode/vsce publish --pat ${{ secrets.VSCE_PAT }} --packagePath ./dist/air-*.vsix

# Publish the built extension to OpenVSX
publish-openvsx:
Expand Down
7 changes: 2 additions & 5 deletions docs-old/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@ This installs it to `~/.cargo/bin` (which must be on your `PATH`), and can be re
Install the dev version of the VS Code extension:

```sh
# The first time
npm install --global vsce

# Install for Positron
cd editors/code && rm -rf *.vsix && vsce package && positron --install-extension *.vsix
(cd editors/code && (rm -rf *.vsix || true) && npx @vscode/vsce package && positron --install-extension *.vsix)

# Install for VS Code
cd editors/code && rm -rf *.vsix && vsce package && code --install-extension *.vsix
(cd editors/code && (rm -rf *.vsix || true) && npx @vscode/vsce package && code --install-extension *.vsix)
```

The CLI tools for Positron or VS Code need to be installed on your path using the command palette command `Shell Command: Install 'code'/'positron' command in PATH`.

0 comments on commit 3144e85

Please sign in to comment.