balena-io / etcher-homepage

Static website for etcher
https://etcher.io/
15 stars 13 forks source link

'latest release' redirects #57

Open lurch opened 7 years ago

lurch commented 7 years ago

As suggested in https://github.com/resin-io/etcher/issues/1476#issuecomment-305181454 it would be nice if e.g. https://etcher.io/stable/Etcher-latest-linux-x86.zip could automatically redirect to https://resin-production-downloads.s3.amazonaws.com/etcher/1.0.0/Etcher-1.0.0-linux-x86.zip and then people could freely link to https://etcher.io/stable/Etcher-latest-linux-x86.zip (and also use the URL in 'download scripts'), safe in the knowledge that it'd always download the latest stable Linux x86 AppImage zipfile. (with the same thing obviously being done for all the other combinations of OS, arch & extension)

We could also have URLs like https://etcher.io/unstable/Etcher-latest-linux-x86.zip which would link to the latest beta / rc version.

Front logo Front conversations

lurch commented 6 years ago

Following on from the discussion in https://github.com/resin-io/resin-wifi-connect/issues/168 if we do do this (and I still think it's a good idea) we should aim to keep the redirect links short (so that they're easy to type if people aren't able to copy'n'paste), stable (i.e. they don't change from one version to the next), and ensure they cover all downloads (i.e. all platforms, and both the GUI and the CLI).

As a first suggestion, what about something like:

short URL redirects to
https://etcher.io/etcher-linux-x86.appimage https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-1.3.1-i386.AppImage
https://etcher.io/etcher-linux-x86.zip https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-1.3.1-linux-i386.zip
https://etcher.io/etcher-linux-x64.zip https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-1.3.1-linux-x86_64.zip
https://etcher.io/etcher-mac.zip https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-1.3.1-mac.zip
https://etcher.io/etcher-linux-x64.appimage https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-1.3.1-x86_64.AppImage
https://etcher.io/etcher-mac.dmg https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-1.3.1.dmg
https://etcher.io/etchercli-mac.tar.gz https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-darwin-x64.tar.gz
https://etcher.io/etchercli-linux-x64.tar.gz https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-linux-x64.tar.gz
https://etcher.io/etchercli-linux-x86.tar.gz https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-linux-x86.tar.gz
https://etcher.io/etchercli-windows-x64.zip https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-win32-x64.zip
https://etcher.io/etchercli-windows-x86.zip https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-win32-x86.zip
https://etcher.io/etcher-linux-x86.rpm https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-electron-1.3.1.i686.rpm
https://etcher.io/etcher-linux-x64.rpm https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-electron-1.3.1.x86_64.rpm
https://etcher.io/etcher-linux-x64.deb https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-electron_1.3.1_amd64.deb
https://etcher.io/etcher-linux-x86.deb https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-electron_1.3.1_i386.deb
https://etcher.io/etcher-windows-x64-portable.exe https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-Portable-1.3.1-x64.exe
https://etcher.io/etcher-windows-x86-portable.exe https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-Portable-1.3.1-x86.exe
https://etcher.io/etcher-windows-x64-setup.exe https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-Setup-1.3.1-x64.exe
https://etcher.io/etcher-windows-x86-setup.exe https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-Setup-1.3.1-x86.exe
https://etcher.io/shasums256.txt https://github.com/resin-io/etcher/releases/download/v1.3.1/SHASUMS256.txt
https://etcher.io/source.zip https://github.com/resin-io/etcher/archive/v1.3.1.zip
https://etcher.io/source.tar.gz https://github.com/resin-io/etcher/archive/v1.3.1.tar.gz

Ordering in the above table matches https://github.com/resin-io/etcher/releases/tag/v1.3.1 . Sorting alphabetically, the short URLs are: etchercli-linux-x64.tar.gz, etchercli-linux-x86.tar.gz, etchercli-mac.tar.gz, etchercli-windows-x64.zip, etchercli-windows-x86.zip, etcher-linux-x64.appimage, etcher-linux-x64.deb, etcher-linux-x64.rpm, etcher-linux-x64.zip, etcher-linux-x86.appimage, etcher-linux-x86.deb, etcher-linux-x86.rpm, etcher-linux-x86.zip, etcher-mac.dmg, etcher-mac.zip, etcher-windows-x64-portable.exe, etcher-windows-x64-setup.exe, etcher-windows-x86-portable.exe, etcher-windows-x86-setup.exe, shasums256.txt, source.tar.gz, source.zip

I've used the same file-extension on the shortcut URLs as the destination URLs, in case anyone's download tool doesn't rename based on the redirected URL, and I've assumed that macOS will always be x64 only.

If we wanted to get crazy, we could even have 'permalinks' like https://etcher.io/1.3.1/etchercli-linux-x64.tar.gz which would always redirect to https://github.com/resin-io/etcher/releases/download/v1.3.1/Etcher-cli-1.3.1-linux-x64.tar.gz (whereas https://etcher.io/etchercli-linux-x64.tar.gz might redirect to https://github.com/resin-io/etcher/releases/download/v1.3.5/Etcher-cli-1.3.5-linux-x64.tar.gz in the future).

Maybe we should "namespace" these redirects e.g. like https://etcher.io/redirects/etchercli-linux-x64.tar.gz or https://redirects.etcher.io/etchercli-linux-x64.tar.gz ? This would a) avoid any potential filename clashes with any real content we might add to the website and b) make it clear that these are just redirects to the files, and not the actual files themselves.

Open to further suggestions... :wink:

Shou commented 6 years ago

@lurch seems we can't redirect to external websites using Github pages but since we're using Cloudflare, albeit a bit more of a manual process I assume, it becomes possible.

lurch commented 6 years ago

Oh right, I forgot we were hosting etcher.io from Github pages :-/ Given the large number of download links above, and given that we're hopefully moving to a more rapid-release timeframe in the future (on the back of @jviotti 's Concourse stuff), IMHO whatever solution we come up with needs to be 100% automatable and not involve any "manual process".