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

update subcomand should check if latest version is installed, if not, installs it. #14

Closed
SergioGasquez opened this issue Oct 11, 2022 · 5 comments · Fixed by #38
Closed
Assignees
Labels
enhancement New feature or request

Comments

@SergioGasquez
Copy link
Member

Motivations

At the moment, espup update, does not check if the latest version is updated. It will just uninstall the current toolchain and install the default (hardcoded) version.

@SergioGasquez SergioGasquez added the enhancement New feature or request label Oct 11, 2022
@SergioGasquez SergioGasquez self-assigned this Oct 11, 2022
@SergioGasquez
Copy link
Member Author

We should avoid having the latest version hardcoded at all. Related with esp-rs/rust-build#125

@jessebraham
Copy link
Member

We use update-informer in espflash for checking updates, allows you to specify either crates.io or GitHub as the distribution source, pretty nice.

@SergioGasquez
Copy link
Member Author

We use update-informer in espflash for checking updates, allows you to specify either crates.io or GitHub as the distribution source, pretty nice.

Thanks for sharing it! It looks really useful, although it won't solve this issue as what we need to check is rust-build/releases. Maybe we could use what you suggested in rust-build#125 but jq is not always present and, we also have to deal with Windows.

We could also use https://github.com/esp-rs/rust-build/releases/latest but, we still need the version as its in the name of the artifacts. E.g rust-1.64.0.0-x86_64-apple-darwin.tar.xz

@jessebraham
Copy link
Member

Maybe a bit of an odd approach, but if there are releases on GitHub available those same versions should be available on crates.io. update-informer will give you the version number of the latest version published on crates.io, so you could use that in turn to pull artifacts from GitHub with a known version number.

@jessebraham
Copy link
Member

jessebraham commented Nov 3, 2022

Actually scratch that, you can specify the repo if using GitHub:

use update_informer::{registry, Check};

let informer = update_informer::new(registry::GitHub, "owner/repo", "0.1.0");
informer.check_version();

Anyways, just an option, plenty of alternatives.

@SergioGasquez SergioGasquez linked a pull request Nov 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants