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

Use GitHub API to check if the CLI is outdated #7312

Closed
adrianbenavides opened this issue Jan 2, 2024 · 2 comments · Fixed by #7365
Closed

Use GitHub API to check if the CLI is outdated #7312

adrianbenavides opened this issue Jan 2, 2024 · 2 comments · Fixed by #7365

Comments

@adrianbenavides
Copy link
Member

Current behavior

We are currently checking a file that we create during the release process to check the latest CLI version.

Desired behavior

We should deprecate that file in favor of using the endpoint that GitHub provides to check the latest release of a project. This can be done by querying the next URL:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/build-trust/ockam/releases/latest

We can use either the tag_name or the name file to extract the node version and compare it to the one returned by crate_version().

@nazmulidris nazmulidris changed the title Use GitHub api to check if the CLI is outdated Use GitHub API to check if the CLI is outdated Jan 2, 2024
@nicklimmm
Copy link
Contributor

Hey, first-timer here, I would like to take on this issue :)

@nazmulidris
Copy link
Contributor

@nicklimmm That's awesome, this is all yours. Please let us know if you have any questions as you explore. You can also ask questions on the contributors discord https://discord.gg/RAbjRr3kds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants