Comment 2 for bug 636017

Revision history for this message
Colin Watson (cjwatson) wrote :

Adding a redirection to the latest release would be relatively straightforward. The difficult bit is providing something that links to a particular *file* in that release, since a given ProductRelease can have several (e.g. .tar.gz and .tar.gz.asc, or download files for different architectures, etc.).

GitHub seems to have a similar sort of problem. I haven't found documentation in a few minutes of poking around, but found a couple of articles:

  https://geraldonit.com/2019/01/15/how-to-download-the-latest-github-repo-release-via-command-line/
  https://stackoverflow.com/questions/24085978/github-url-for-latest-release-of-the-download-file

So maybe it would be enough if we had something to get JSON describing the files attached to the latest release, and then it would be a two-step process, at least no worse than GitHub?

Note that you can do this today using Launchpad's API by starting from the releases collection of the relevant project series (e.g. https://api.launchpad.net/devel/lazr.restfulclient/releases), but at present you have to work out the latest release for yourself, then pick out the files_collection_link for that and look at that to find the file you want. It's a bit easier if you can use launchpadlib, but still quite awkward. Providing something that at least simplifies the process of finding the latest release would be helpful, I think.