-
Notifications
You must be signed in to change notification settings - Fork 128
feat(l1): periodically check if there is a newer release available #5322
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
Conversation
Lines of code reportTotal lines added: Detailed view |
cmd/ethrex/Cargo.toml
Outdated
| thiserror.workspace = true | ||
| itertools = "0.14.0" | ||
| url.workspace = true | ||
| semver = "1.0.27" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not following semver right now, so this is probably not the right tool to use.
I would just use a simple inequality check against latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But wouldn't that be bothersome if the user is running a newer version instead of the latest? Like a release candidate on in-development version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I would still not use a crate that assumes semver in a package that explicitly opts out of semver. A simple function that splits and parses integers and checks whether any is less than the latest version's one should suffice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I wanted to avoid implementing a manual comparison as we already have semver as a dependency on most of our lock files that provides it, but we can add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added manual version comparison: f637f4e
cmd/ethrex/ethrex.rs
Outdated
| } | ||
| let client = reqwest::Client::new(); | ||
| let response = client | ||
| .get("https://api.github.com/repos/lambdaclass/ethrex/releases/latest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put the URL in a constant in a common place
Motivation
Periodically checking and informing the user if there is a newer version of ethrex available
Description