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

Make a 'check for update' executable that propose to download the latest version if available. #65

Open
end2endzone opened this issue Aug 8, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@end2endzone
Copy link
Owner

In the ShellAnything menu, a new menu entry could be created to allow the user to run an executable that checks for new version of ShellAnything.

The latest version can be found here: https://github.com/end2endzone/ShellAnything/releases/latest

If a new version is found, it could open its download url in the users default browser.

@end2endzone end2endzone added enhancement New feature or request good first issue Good for newcomers labels Aug 8, 2020
@end2endzone end2endzone added the help wanted Extra attention is needed label Aug 25, 2020
@GasDauMin
Copy link
Collaborator

GasDauMin commented Jan 4, 2021

How about idea.

We have to create simple page where we trying parsing current version from git and comparing with version of aplication? For transfering current application version we can use GET HTTP methodology. And correct me if I'm wrong, we can host parser in github directly.

image

Example: https://www.irfanview.com/checkversion.php?ver=4.56

@end2endzone
Copy link
Owner Author

Hi.
Thank you for providing feedback and new ideas to this issue.

I do not think that using GitHub Pages would be necessary as GitHub already provides an API to get the latest version in an easily parse-friendly format:

If you browse to https://api.github.com/repos/end2endzone/ShellAnything/releases/latest you get a nice JSON file which provides all the same information available as the html version.

As of today, the following JSON file is downloaded:
(note that I have omitted many tags for clarity)

{
  "url": "https://api.github.com/repos/end2endzone/ShellAnything/releases/33953477",
  "assets_url": "https://api.github.com/repos/end2endzone/ShellAnything/releases/33953477/assets",
  "tag_name": "0.5.1",
  "target_commitish": "master",
  "name": "0.5.1",
  "draft": false,
  "prerelease": false,
  "created_at": "2020-11-14T15:47:46Z",
  "published_at": "2020-11-14T15:50:07Z",
  "assets": [
    {
      "url": "https://api.github.com/repos/end2endzone/ShellAnything/releases/assets/28314977",
      "id": 28314977,
      "node_id": "MDEyOlJlbGVhc2VBc3NldDI4MzE0OTc3",
      "name": "ShellAnything-0.5.1-win64.exe",
      "label": null,
      "content_type": "application/x-msdownload",
      "state": "uploaded",
      "size": 1376274,
      "download_count": 17,
      "created_at": "2020-11-14T16:08:15Z",
      "updated_at": "2020-11-14T16:08:18Z",
      "browser_download_url": "https://github.com/end2endzone/ShellAnything/releases/download/0.5.1/ShellAnything-0.5.1-win64.exe"
    },
    {
      "url": "https://api.github.com/repos/end2endzone/ShellAnything/releases/assets/28314978",
      "id": 28314978,
      "node_id": "MDEyOlJlbGVhc2VBc3NldDI4MzE0OTc4",
      "name": "ShellAnything-0.5.1-win64.msi",
      "label": null,
      "content_type": "application/octet-stream",
      "state": "uploaded",
      "size": 1880064,
      "download_count": 13,
      "created_at": "2020-11-14T16:08:18Z",
      "updated_at": "2020-11-14T16:08:20Z",
      "browser_download_url": "https://github.com/end2endzone/ShellAnything/releases/download/0.5.1/ShellAnything-0.5.1-win64.msi"
    },
    {
      "url": "https://api.github.com/repos/end2endzone/ShellAnything/releases/assets/28314974",
      "id": 28314974,
      "node_id": "MDEyOlJlbGVhc2VBc3NldDI4MzE0OTc0",
      "name": "ShellAnything-0.5.1-win64.zip",
      "label": null,
      "content_type": "application/zip",
      "state": "uploaded",
      "size": 1646531,
      "download_count": 13,
      "created_at": "2020-11-14T16:08:13Z",
      "updated_at": "2020-11-14T16:08:15Z",
      "browser_download_url": "https://github.com/end2endzone/ShellAnything/releases/download/0.5.1/ShellAnything-0.5.1-win64.zip"
    }
  ],
  "tarball_url": "https://api.github.com/repos/end2endzone/ShellAnything/tarball/0.5.1",
  "zipball_url": "https://api.github.com/repos/end2endzone/ShellAnything/zipball/0.5.1"
}

From the JSON file, we can get the latest version from tag_name tags.

I did not planned on allowing ShellAnything to actually download the installers because they can change over time but it is still a possibility. If required, then each assets' browser_download_url tag can be used to get a downloadable url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants