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: show when new version is available #598

Merged
merged 4 commits into from
Apr 20, 2021
Merged

feat: show when new version is available #598

merged 4 commits into from
Apr 20, 2021

Conversation

craicoverflow
Copy link
Contributor

@craicoverflow craicoverflow commented Apr 19, 2021

Closes #178

Limitations: If you are currently using a pre-release version, this does not check for an update. We could improve this in the future.

Verification Steps

  1. Build the CLI with a version which is below the current latest version:
RHOAS_VERSION=0.1.0 make binary
  1. Run any command in debug mode OR login.
$ ./rhoas version -d
rhoas version 0.1.0

A new version of rhoas is available: 0.22.2
https://github.com/redhat-developer/app-services-cli/releases/tag/0.22.2
❯ ./rhoas login
Logging in...
Logged in successfully
Logging in to MAS-SSO...
Logged in successfully to MAS-SSO

You are now logged in as "craicoverflow"

A new version of rhoas is available: 0.22.2
https://github.com/redhat-developer/app-services-cli/releases/tag/0.22.2

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Other (please specify)

Checklist

  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

@craicoverflow craicoverflow requested a review from wtrocki April 19, 2021 16:31
@wtrocki
Copy link
Collaborator

wtrocki commented Apr 19, 2021

👁️

@wtrocki
Copy link
Collaborator

wtrocki commented Apr 19, 2021

Detection in debug mode is only temporary right?
How do you see this evolving

@craicoverflow
Copy link
Contributor Author

Detection in debug mode is only temporary right?
How do you see this evolving

Two places currently:

  • When you log in
  • When you are in debug mode

But should extend it to the version command also. I don't want to display it in too many places like on every command - that would be quite annoying IMO.

@wtrocki
Copy link
Collaborator

wtrocki commented Apr 19, 2021

Kudos for ignoring prereleases and dev versions :D

Tested it locally with dev, prerelease and proper version :)

@craicoverflow craicoverflow merged commit 076f21e into main Apr 20, 2021
@craicoverflow craicoverflow deleted the version-check branch April 20, 2021 07:33
@craicoverflow
Copy link
Contributor Author

I've added it to the version command now too.

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.

CLI version command can check if CLI wasn't updated
2 participants