eepm
eepm copied to clipboard
Use github api for release listing
Github has an api for getting releases. I've seen someone at AUR even use it. Apparently, it is described on the page https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release But as I understand it, a token is required for access, and there is no free access to this information.
We need information about the available releases, given the pre-release flag.
From the page you provided:
This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.
To get all releases with all asets you just need the command
curl -s "https://api.github.com/repos/user/repo/releases" | jq -r '.[] | .assets[].browser_download_url'.
To ignore pre-releases
curl -s "https://api.github.com/repos/user/repo/releases" | jq -r '.[] | select(.prerelease == false) | .assets[].browser_download_url''