Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pure-text manifest file under dl.elv.sh #776

Closed
notramo opened this issue Nov 7, 2018 · 7 comments
Closed

Add pure-text manifest file under dl.elv.sh #776

notramo opened this issue Nov 7, 2018 · 7 comments

Comments

@notramo
Copy link

notramo commented Nov 7, 2018

The current version can be downloaded at https://dl.elv.sh/{os}-{arch}/elvish-{version}.tar.gz
This URL isn't easy to remember if someone want to download it from a fully CLI environment without browser.
Something similar to this would be better:
https://elv.sh/get/linux-64
https://elv.sh/get/windows-32
https://elv.sh/get/linux-arm
These should automatically redirect to the download link of the latest release.

@xiaq
Copy link
Member

xiaq commented Nov 17, 2018

One thing I didn't document is that uncompressed versions of the binaries are also available, just remove the .tar.gz at the end. For instance, the linux-amd64 binary for HEAD is
https://dl.elv.sh/linux-amd64/elvish-HEAD.

Using that as a baseline, the URLs you proposed don't have the following:

  • The architecture names are abbreviated: for instance, amd64 is abbreviated to 64.

    Although it makes sense for now, will amd64 be "the" 64-bit architecture in the future?

  • They don't have the version. That looks like an oversight to me. Should the URLs fetch the latest release or HEAD? It's better to make it explicit.

  • As you said, the URLs should redirect to the "full" URLs. However, note that curl does not follow HTTP redirects by default, and this will make for a poorer user experience.

The current URLs also have the advantage that the last component makes sense as filenames. For instance, if you download https://dl.elv.sh/linux-amd64/elvish-HEAD to a linux-amd64 machine, the filename elvish-HEAD makes sense, because you don't need to be reminded that this is a linux machine running amd64.

tl;dr: I think the current URLs are only slightly longer and better than the URLs you proposed.

Happy to hear your opinions.

@xiaq xiaq added the comp:web label Nov 17, 2018
@notramo
Copy link
Author

notramo commented Nov 19, 2018

@xiaq You are right.
One thing that might help us when downloading in command line environment would be a text file at e.g. https://elv.sh/get/list that contains urls for architectures

HEAD
Linux x86_64 https://dl.elv.sh/linux-amd64/elvish-HEAD
Linux x86 https://dl.elv.sh/linux-386/elvish-HEAD
...

Latest stable release
Linux x86_64 https://dl.elv.sh/linux-amd64/elvish-v0.12.tar.gz
Linux ARMv8 https://dl.elv.sh/linux-arm64/elvish-v0.12.tar.gz
...

@xiaq xiaq changed the title Easy download url Add pure-text manifest file under dl.elv.sh Apr 6, 2019
@xiaq
Copy link
Member

xiaq commented Apr 6, 2019

I've rebranded this issue as "Add pure-text manifest file under dl.elv.sh".

@xiaq
Copy link
Member

xiaq commented Apr 6, 2019

I just realized that you are really asking for an ls-lR file in good old FTP fashion. I did some research on whether modern http servers support generating ls-lR files automatically, and it seems that neither nginx nor Caddy has support for that niche(?) feature.

@xiaq
Copy link
Member

xiaq commented Apr 6, 2019

Actually, since the upload server of dl.elv.sh is written by me (https://github.com/elves/up), I filed elves/up#1 to track this.

@xiaq
Copy link
Member

xiaq commented Apr 6, 2019

Now that elves/up#1 has been fixed, there should be a https://dl.elv.sh/index.txt after next push.

@xiaq
Copy link
Member

xiaq commented Apr 7, 2019

https://dl.elv.sh/INDEX now contains a list of all files available for download.

@xiaq xiaq closed this as completed Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants