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

Shorter URL for install script? #1017

Open
Efreak opened this issue Feb 21, 2016 · 8 comments
Open

Shorter URL for install script? #1017

Efreak opened this issue Feb 21, 2016 · 8 comments
Labels
feature requests I want a new feature in nvm! installing nvm Problems installing nvm itself

Comments

@Efreak
Copy link

Efreak commented Feb 21, 2016

Can you add a gh-pages branch that with the download script? It would be nice to be able to just remember something like curl -o- http://creationix.githubio/nvm|bash than having to look up the install command each time. This is similar to get-pip.py and other tools.

Since github pages doesn't allow for automatic redirection rules (like grabbing the latestThis script could also probable be made to fetch the releases list and use that to get the latest tag. This way it would never need to be updated. Maybe something like:

curl -o- https://raw.githubusercontent.com/creationix/nvm/`curl -o- https://api.github.com/repos/creationix/nvm/releases -s| grep -m 1 tag_name|grep -oP 'v[\d\.]+'`/install.sh | bash
@ljharb
Copy link
Member

ljharb commented Feb 21, 2016

This is related to #400 but not an exact duplicate, so I'll leave it open.

This could be achieved by keeping a latest tag and continuing to move it with every release, and using the URL https://raw.githubusercontent.com/creationix/nvm/latest/install.sh (which 404s right now).

However, I'm not so sure it's a good idea to enable people to blindly update their software to what might be a breaking version.

@ljharb ljharb added installing node Issues with installing node/io.js versions. feature requests I want a new feature in nvm! labels Feb 21, 2016
@scic
Copy link

scic commented May 3, 2016

We manage the nvm installation with a script for new computers. But now I have to manually track new releases and update the install URL each time. A version independent URL would be appreciated.

@ljharb ljharb added installing nvm Problems installing nvm itself and removed installing node Issues with installing node/io.js versions. labels Jun 30, 2016
@coreygo
Copy link

coreygo commented Dec 10, 2017

I just installed via:
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

Unless I'm mistaken, please correct me if I am, since install.sh#L14 is specifying the latest version number, using the raw master branch URL should work for installing and upgrading. I guess doing this through the latest tag is basically the same idea.

@ljharb
Copy link
Member

ljharb commented Dec 10, 2017

@coreygo nope, if you use master, you will definitely risk getting a broken build. I break master all the time, sometimes on purpose, just to screw with people who are installing of of master.

You should only ever install from a tagged release.

@coreygo
Copy link

coreygo commented Dec 10, 2017

@ljharb I typically check install scripts and release notes beforehand but purposely breaking to screw with people seems... Eek.

@ljharb
Copy link
Member

ljharb commented Dec 10, 2017

@coreygo i'm being a bit melodramatic :-) but it's more like, if i have major refactors going on, i do not think twice about pushing broken code to master, because master is for development, not for direct use.

@coreygo
Copy link

coreygo commented Dec 10, 2017

@ljharb Heh. No worries, I get that. I'd probably go with the latest tag method you mentioned and call it good.

@coreygo
Copy link

coreygo commented Dec 10, 2017

@ljharb Always amused how developers [randomly] agree on best practices… I've been clean installing, updating dotfiles, and I just finished installing Homebrew (which does use the raw master branch URL for the install script) when I noticed nvm hard coding the version. 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm! installing nvm Problems installing nvm itself
Projects
None yet
Development

No branches or pull requests

4 participants