gojek / proctor

A Developer-Friendly Automation Orchestrator
Apache License 2.0
123 stars 43 forks source link

Notice to upgrade proctor CLI when out of date #55

Open olttwa opened 5 years ago

olttwa commented 5 years ago

As an admin, I want to notify users when new version is available whenever they run proctor version

Example:

$terraform version
Terraform v0.11.7

Your version of Terraform is out of date! The latest version
is 0.11.10. You can update by downloading from www.terraform.io/downloads.html
RajatVaryani commented 5 years ago

@olttwa Can I pick this up?

olttwa commented 5 years ago

@RajatVaryani currently there's an implementation on the server side to have a forceful upgrade of client. You can check that here

For above feature, how are you thinking to implement it?

If I were to implement it, I'd fetch the releases from github, and if current version is lower, display a message as:

Your version of Proctor client is out of date! The latest version
is 0.5.0. You can update by either running `brew upgrade proctor` or downloading a release for your OS here: https://github.com/gojektech/proctor/releases
RajatVaryani commented 5 years ago

@olttwa I had the same approach. See the tag name of the latest release using https://api.github.com/repos/gojektech/proctor/releases/latest if that doesn't match show the message.

olttwa commented 5 years ago

@RajatVaryani seems like a good approach. Please go ahead.