Download and Keep Binaries From Github Releases Updated

May 15, 2020

Categories: Technical Tags: Programming Software

The advent of technologies like Rust/Golang/Nim, musl libc, better CI/CD workflow etc. mean that many projects are doing multi platform/arch (static) binary releases at github. While distro provided packages that correctly link with necessary system libs remain the best choice, sometimes i) the program isn’t packaged for your distro ii) you hop between many machines/distros anyway.

Assuming this hadn’t been done, unless you are willing to i) package it for every distro you use or package it for distro agnostic systems like Docker, Nix/Guix ii) and then take on the burden of maintaining it for others, or setup private repo iii) and then track releases and actually rebuild/update it, downloading stuffs from github might actually be more convenient (I mean I hope this isn’t false dichotomy, but what are other options? snap/flatpack for a CLI program feels wrong to me, appimage is okay but lacks traction and I don’t have very high regard for average quality of an AUR package, maybe we all should switch to Bedrock Linux), but anyway I digress.

The manual interventions necessary to periodically check and download from github could be automated. I have written a little something that allows you to declaratively describe the packages you use in a config file which you can then just carry around, perhaps even hook it up to a cron and forget. It's up on github.

It was an excuse to write some Hy. I wanted to use an embedded Lisp for user provided customisation and it worked out quite well. Although in this case some heuristcs went a long way to not really need as much customisation as I anticipated at first. But it's a great paradigm as always.