I am trying to set up an automated build of a docker container and I am looking for a way to programmatically get the latest release from the github repository so I can download the precompiled binaries. The goal is to do this:
LATEST=97040891 wget https://github.com/LBNL-ETA/Radiance/releases/download/"$LATEST"/Radiance_"$LATEST"_Linux.zip unzip Radiance_*_Linux.zip tar -xzf radiance-*-Linux.tar.gz
where LATEST would be programattically assigned. I don’t otherwise ned to clone the repository and besides I don’t think I can get this information from git as something like:
git ls-remote --tags origin
does not sort by date and the tags are otherwise unordered. A quick google suggests I can do this with the github api, but before I go down that path I thought I would see if anyone has already done something similar, or since I think this repository is mostly automated if there would be an easy way to add a “latest” tag to the build process so that this url:
https:// github.com /LBNL-ETA/Radiance/releases/download/latest/Radiance_latest_Linux.zip
would always work.