Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automatically install Sprocket from GitHub releases. #7

Merged
merged 5 commits into from
Oct 21, 2024

Conversation

peterhuene
Copy link
Contributor

This PR adds a feature to the VSCode extension to automatically download
the latest stable Sprocket from GitHub releases.

It does this by first querying crates.io for the latest stable sprocket
crate version; it then fetches the GitHub release artifact corresponding to
that version.

The extension will also check for newer versions to what has been previously
downloaded and prompt to download and update to the next version.

A new setting has been added to control checking for updates on startup.

This commit adds a feature to the VSCode extension to automatically download
the latest stable Sprocket from GitHub releases.

It does this by first querying `crates.io` for the latest stable `sprocket`
crate version; it then fetches the GitHub release artifact corresponding to
that version.

The extension will also check for newer versions to what has been previously
downloaded and prompt to download and update to the next version.

A new setting has been added to control checking for updates on startup.
@peterhuene
Copy link
Contributor Author

I need to test this on Linux and Windows, but it's working well on macOS.

This should hopefully make it both easier to use the VSCode extension and to get notified to update when Sprocket releases occur.

This commit refactors the installation code to be a little more readable.
Also fixes:

* SVG isn't allowed from the marketplace when building the extension.
* The asset path doesn't like the `./` prefix when building the extension.
Copy link
Member

@a-frantz a-frantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with the big caveat that I haven't written JavaScript in ages lol. So whatever my review is worth, 👍

@peterhuene peterhuene merged commit eeffe89 into stjude-rust-labs:main Oct 21, 2024
1 check passed
@peterhuene peterhuene deleted the auto-download branch October 21, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants