Is there an easy way to programmatically get the version numbers or links to the packages for the latest released stable and devel packages for macOS and Windows? If there is not, would it be possible to add one?
Background
Currently, it's quite easy to do this for Ubuntu using the PPA. And this is used by the setup-swi-prolog GitHub Action to automate the installation of SWI-Prolog for continuous integration testing. However, this is not so easy to do for macOS and Windows using both the stable and devel releases.
What I think might work is to have a file for each of the release and platform combinations. In that file would be the version number of the latest. Consider something like this:
Is there an easy way to programmatically get the version numbers or links to the packages for the latest released
stable
anddevel
packages for macOS and Windows? If there is not, would it be possible to add one?Background
Currently, it's quite easy to do this for Ubuntu using the PPA. And this is used by the
setup-swi-prolog
GitHub Action to automate the installation of SWI-Prolog for continuous integration testing. However, this is not so easy to do for macOS and Windows using both thestable
anddevel
releases.See https://github.com/logtalk-actions/setup-swi-prolog/issues/4 for more background and motivation.
Note that this is for an automated install, which does not appear to be the premise behind https://github.com/SWI-Prolog/plweb-www/issues/22.
Request
What I think might work is to have a file for each of the release and platform combinations. In that file would be the version number of the latest. Consider something like this:
https://www.swi-prolog.org/download/stable/bin/macos-latest.txt
8.2.4-1
https://www.swi-prolog.org/download/stable/bin/windows-latest.txt
8.2.4-1
https://www.swi-prolog.org/download/devel/bin/macos-latest.txt
8.3.28-1
https://www.swi-prolog.org/download/devel/bin/windows-latest.txt
8.3.28-1
Then, if the package file names are consistently named, we could reconstruct the URL of the latest release for
stable
ordevel
, macOS or Windows.These files would need to be updated on every
stable
ordevel
release. Is that something that could be automated?Another option would be to have a “latest” URL that redirects to the latest package URL. For example:
https://www.swi-prolog.org/download/stable/bin/swipl-latest.x86_64.dmg
➡️https://www.swi-prolog.org/download/stable/bin/swipl-8.2.4-1.x86_64.dmg
Alternative
If you don't think something like this would be reasonable to provide, I suppose we could scrape the HTML of https://www.swi-prolog.org/download/stable and https://www.swi-prolog.org/download/devel, but I think that is a fragile process and could break if the HTML changes.
Thanks for your consideration! Any feedback is welcome.