-
Notifications
You must be signed in to change notification settings - Fork 85
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: check for available updates #319
Conversation
327f659
to
0361f50
Compare
src/utils/version.rs
Outdated
"There is a newer version of Rover available for download: {} (currently running v{})\n\nFor instructions on how to install the latest version of Rover, see {}", | ||
Cyan.normal().paint(format!("v{}", latest)), | ||
PKG_VERSION, | ||
Cyan.normal().paint("https://go.apollo.dev/r/start") |
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.
"There is a newer version of Rover available for download: {} (currently running v{})\n\nFor instructions on how to install the latest version of Rover, see {}", | |
Cyan.normal().paint(format!("v{}", latest)), | |
PKG_VERSION, | |
Cyan.normal().paint("https://go.apollo.dev/r/start") | |
"There is a newer version of Rover available for download: {} (currently running v{})\n\nFor instructions on how to install the latest version of Rover, run {}", | |
Cyan.normal().paint(format!("v{}", latest)), | |
PKG_VERSION, | |
Yellow.normal().paint("`rover docs open start`") |
src/error/metadata/mod.rs
Outdated
@@ -71,6 +71,7 @@ impl From<&mut anyhow::Error> for Metadata { | |||
} | |||
RoverClientError::InvalidKey => (Some(Suggestion::CheckKey), None), | |||
RoverClientError::MalformedKey => (Some(Suggestion::ProperKey), None), | |||
RoverClientError::UnparseableReleaseVersion => (None, None), |
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.
seems like this should maybe be one of the "file an issue" suggestions, what do you think?
looking good! if we wanted to get fancy on it we could wrap that version update text in one of my fancy Billboards (should use what's on the latest branch there, i've changed the api a bit and haven't published quite yet) |
Definitely! I forgot about that :) And that'd make the message stand out a lot more, so hopefully it wouldn't be missed! |
Fixes #296
I added a util
version
module that can be called from the root of the cli (in therun
fn) or from therover update check
command.I kept the interaction with GitHub and the network requests in
rover-client
even though it's not graphql :)Logging was a bit of a weird question, so I used
eprintln
inside the check fn, not inside their calling commands. Happy to hear other recommendations though!