OpenLens icon indicating copy to clipboard operation
OpenLens copied to clipboard

Create deterministic download/release URLs from version, os, and arch

Open jvanzyl opened this issue 3 years ago • 1 comments

I have an an automated provisioning tool for populating developer spaces (laptops, VMs, docker images) and it would be nice to provision OpenLens but the URL structure for the current downloads makes that difficult without a lot of conditional logic. Might it be possible to create the standard tar.gz files for the platforms along with what's currently being done?

For example the template URL might look like this:

https://github.com/MuhammedKalkan/OpenLens/releases/download/v{version}/OpenLens-{version}-{os}-{arch}.tar.gz

And specific URLs based on the version, os, and arch might look like the following:

https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-darwin-amd64.tar.gz
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-darwin-arm64.tar.gz
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-linux-amd64.tar.gz
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-linux-arm64.tar.gz
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-windows-amd64.tar.gz
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.0.0/OpenLens-6.0.0-windows-arm64.tar.gz

In this way knowing the version and detecting the os and arch it's very easy to grab the right tar.gz file for a given user.

Thanks!

Jason

jvanzyl avatar Aug 03 '22 11:08 jvanzyl

@jvanzyl I'm against using tar.gz on Windows, because tar is a Linux tool and while it was ported to Windows, it's mostly irrelevant on Windows. Windows distribution should use Windows native format (e.g. zip or exe) not Linux tar.

AndrewSav avatar Aug 29 '22 02:08 AndrewSav

I think links are almost identical. You can get latest list as curl -s https://api.github.com/repos/muhammedkalkan/openlens/releases/latest | jq -r '.assets[] | .browser_download_url[0:]'

https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0-arm64.dmg
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0-arm64.dmg.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0-arm64.zip
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0-arm64.zip.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.AppImage
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.AppImage.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.deb
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.deb.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.dmg
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.dmg.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.exe
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.exe.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.rpm
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.rpm.sha256
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.zip
https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.1.0/OpenLens-6.1.0.zip.sha256

MuhammedKalkan avatar Sep 21 '22 04:09 MuhammedKalkan