Skip to content

[FEAT] When the CLI runs, attempt to discover if a newer version is available #39

@Joseph94m

Description

@Joseph94m

@thomasboni I think we can mark this as a good first issue for new contributors.

Tell the user if a newer version is available when they user plumber to analyze their project.
This means:

  • Identify the version that the user is using
  • Perform a call to the github releases download page to fetch the most recent release
  • if different, print a message that a new version is available with a link to the install/upgrade instructions in the readme
  • The calls to the github releases page must be fail-fast: we do not want a large time-overhead for this. It either works or it doesn't

Note: For use cases using docker images (notably the gitlab component), the images embed a plumber binary so it should be able to perform the same check.

We must take all these cases into account dynamically (not hard coded)
Use libraries like semver that know how to handle and compare versions.

Particular cases:

  • What happens when the call fails because the user is running in air-gap env with only access to their gitlab repo? There shouldn't be a large time overhead.
  • Do we want to display such a message in the CI/component or only as a CLI? If only as a cli then use the CI or GITLAB_CI gitlab predefined env variable to know if we are in an CI or not

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions