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: check for available updates #319

Merged
merged 7 commits into from
Mar 3, 2021
Merged

Conversation

JakeDawkins
Copy link
Contributor

@JakeDawkins JakeDawkins commented Mar 1, 2021

Fixes #296

I added a util version module that can be called from the root of the cli (in the run fn) or from the rover 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!

@JakeDawkins JakeDawkins added the feature 🎉 new commands, flags, functionality, and improved error messages label Mar 1, 2021
Comment on lines 66 to 69
"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")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"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`")

@@ -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),
Copy link
Contributor

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?

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Mar 1, 2021

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)

@JakeDawkins
Copy link
Contributor Author

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!

@JakeDawkins JakeDawkins merged commit f03dbe4 into main Mar 3, 2021
@JakeDawkins JakeDawkins deleted the jake/updateeeeeeee-pleas branch March 3, 2021 13:52
@JakeDawkins JakeDawkins added this to the March 9 milestone Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if rover is up to date
2 participants