06-14-2022, 02:39 AM
Good news and bad news:
The good news is that GitHub does actually have a
If you're a bit adventurous there is a GitHub API that can give you the information you need, try hitting
We probably could also push the release artifacts somewhere else with a stable name like you're suggesting, however I can't make any expectations that it would be setup soon, so if possible I'd recommend just getting the necessary information from GitHub instead. Still I think it's a reasonable idea, and certainly doable.
For development versions things are a lot messier. We don't have a development/stable distinction with QB64 PE, there's just a stable branch, and ideally the latest release shouldn't be that far behind where that branch is. You can however make use of the CI builds made off of the
The good news is that GitHub does actually have a
releases/latestendpoint, so you can use that to get the latest version. The bad news is that I recently changed the asset names to include the version number (so it's easy to tell what you're downloading, and also so that the different versions don't conflict when downloaded) so they're no longer predictable for you and mostly leaves you back where you were.
If you're a bit adventurous there is a GitHub API that can give you the information you need, try hitting
https://api.github.com/repos/QB64-Phoeni...ses/latestand you'll get back JSON that includes both the tag name (indicating the version) and also the individual assets with their names and download links (so you can look for the
qb64_lnx*.tar.gzasset and download it via the associated link). If you're willing to use
jqin your script then I think this is a pretty viable approach as all the information is right there. If you don't want to use
jqthen you could still do it, but you'll have to resort to some ugly text parsing to get the information you need.
We probably could also push the release artifacts somewhere else with a stable name like you're suggesting, however I can't make any expectations that it would be setup soon, so if possible I'd recommend just getting the necessary information from GitHub instead. Still I think it's a reasonable idea, and certainly doable.
For development versions things are a lot messier. We don't have a development/stable distinction with QB64 PE, there's just a stable branch, and ideally the latest release shouldn't be that far behind where that branch is. You can however make use of the CI builds made off of the
mainbranch, and you can probably get those via the API but I'm not really sure how. The CI artifacts are also not the same thing as a release, they're a zip file that actually contains the release artifact inside (along with some other build information). So long story short I'm not sure it's worth worrying about dev versions at the moment.