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

Include notification of available update for command line users #17

Open
nilshoffmann opened this issue Sep 3, 2021 · 1 comment
Open

Comments

@nilshoffmann
Copy link
Member

While Skyline users will receive a visual cue that an updated version of LipidCreator is available from the ToolStore, users of the standalone version will not receive any notification at the moment.
It would be great if we could either check GitHub's releases API

Using a GET request with the HTTP Header Accept=application/json, the endpoint https://github.com/lifs-tools/lipidcreator/releases/latest returns

{
  "id": 48720087,
  "tag_name": "787",
  "update_url": "/lifs-tools/lipidcreator/releases/tag/787",
  "update_authenticity_token": "JLhrOeswHJxqD5oNBOh5bdu7UsoLtb7Z35M3Rdi5QFozpBeToO0UdC2PDeYHEYPTV59Onp8TEJvJNo3gzOqI4Q==",
  "delete_url": "/lifs-tools/lipidcreator/releases/tag/787",
  "delete_authenticity_token": "l6icnoZAaE83n8Km2Ka71vJPT2veQjT+KxbMSfoi5GU9qlmN5zgj/KOUWNBHt6aSNq78Dcl/OVBPwPSqhkn0KQ==",
  "edit_url": "/lifs-tools/lipidcreator/releases/edit/787"
}

Since our build numbers are strictly increasing, this can be checked against LipidCreator's internal build number. If the latest release number is greater, an update is available.

@nilshoffmann nilshoffmann added this to the LipidCreator 2.0 milestone Sep 3, 2021
@nilshoffmann
Copy link
Member Author

The actual call should go to

https://api.github.com/repos/lifs-tools/lipidcreator/releases/latest

See https://docs.github.com/en/rest/reference/repos#get-the-latest-release

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

No branches or pull requests

1 participant