ProjectABE
ProjectABE copied to clipboard
Getting the latest release through GitHub releases?
Would it be possible to have the emulator detect a GitHub releases URL (i.e. https://github.com/<user>/<repo>/releases
) or a latest release URL (i.e. https://github.com/<user>/<repo>/releases/latest
) and have it correctly pick the first .hex
from the latest release so people who use GitHub's release system never have to update a URL to ProjectABE if it's pointing to the releases section of a repo?
(If this is already possible, or something like this is already possible, I can't find it documented.)
I remember I tried to do this once, but it was problematic. The extra check can make loading noticeably slower because of CORS.
Wouldn't it be possible to:
- Take the releases url (e.g.
https://github.com/Pharap/Minesweeper/releases
) - Extract a suitable
.hex
from the list- (I realise finding a suitable
.hex
from a release if there's more.hex
than one would be difficult, but I assume at least identifying the most recent release would be possible.)
- (I realise finding a suitable
- Redirect the user to a url using that hex (e.g.
https://felipemanga.github.io/ProjectABE/?hex=https://github.com/Pharap/Minesweeper/releases/download/v2.0.1/Minesweeper.EN-GB.hex
)
If the user is redirected then it would only be slow the first time while being redirected, and after that it would act like a normal link to an exact .hex
.
Or am I missing something?
(Webdev isn't my strong suit. I sort of understand CORS after reading about it, but I don't see any further implications of it being in use.)