-
Notifications
You must be signed in to change notification settings - Fork 1
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
handle nvm and .nvmrc #182
Conversation
Nice! But have you considered fetching the nvm script without using brew? It seems like installing nvm is quite simple: Currently, to enhance stability of the linux build servers, when When OS is not linux, or if FORCE_BREW=true then In this case, perhaps you could use the curl|bash combo If so, then you could perhaps name the script |
A. on-topic I can do that if you insist. No problem. B. off-topic The question that you put forward is about stability though, and there's "nothing" unstable about Having said that, one can install via Even better, since we have docker images of ubuntu, bootstrapped with a (aka stable) version of ❗ NOTE: there's at least one bug in support-firecloud related to what I wrote above, namely that in a
Worth mentioning also that doing strict versioning makes it hard/impossible to bootstrap a developer machine. If nvm 0.35.3 has a security bug, and I already updated to 0.36.3 - I will go back to 0.35.3 unintentionally whenever I run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand the changes and they look good to me :)
Thanks Andrei! I now understand the purpose of nvm and I approve of it being merged! |
nvm
https://github.com/nvm-sh/nvm is one node version manager. Two notable alternatives are https://github.com/tj/n and https://github.com/isaacs/nave . In the future, it would be worthwhile to look inton
as it has no intricate shell setup asnvm
andnave
have, and it is also more active thannvm
.This PR adds support for nvm in 2 ways:
make
calls will automatically have thePATH
correctly set in order to hit thenode
version specified in the project's.nvmrc
file (root of the repository only). See changes incore.common.mk
exe-env.inc.sh
, will also havenvm
enabled, primarily for convenience, for those cases wherenode
is called directly e.g.ng build
, and not viamake
.Note that the projects that depend on
nvm
would need to addsource ${SUPPORT_FIRECLOUD_DIR}/ci/brew-install-node.nvm.inc.sh
to theirBrewfile.inc.sh
- which will install bothnvm
(via homebrew) but also directly callnvm install <node version specified in .nvmrc file>
WARNING: the
nvm-get-nvm-bin
script is not super-super-fast, but still acceptable (~1s), and that each and every call tomake
would imply also one call tonvm-get-nvm-bin
. Thus there's one (1) second added to eachmake
call inside a project with a.nvmrc
file.PS: this PR is a port of functionality from https://github.com/rokmoln/support-firecloud . I have not tested the ported functionality.
cc @spschlegel @tobiiasl