This repository has been archived by the owner on Sep 8, 2021. It is now read-only.
Add site with redirects for consistent latest-release URLs #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a
site
folder with a single_redirects
file. When published to Netlify, this generates redirects from consistent "latest" URLs to the direct download links for the latest release.You can test the redirects in the branch deploy:
https://latest-release-redirects--cli.netlify.com/download/latest/mac
https://latest-release-redirects--cli.netlify.com/download/latest/linux
https://latest-release-redirects--cli.netlify.com/download/latest/windows
https://latest-release-redirects--cli.netlify.com/download/latest/source-zip
https://latest-release-redirects--cli.netlify.com/download/latest/source-tar
All of these redirects are 302 temporary, since they'll change with each new release. At the moment, the change will have to be manual, but we can add a script to automate it later.
I also added a couple of catch-all redirects pointing to the releases page and the repo readme, in case they're useful. You can test these, too:
https://latest-release-redirects--cli.netlify.com
https://latest-release-redirects--cli.netlify.com/download