-
Notifications
You must be signed in to change notification settings - Fork 31
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 compatibility for 0.11, 0.12 and iojs #41
Conversation
We should not update npm which came in bundled with io.js because node-gyp doesn't support downloading sources from iojs yet. More info on nodejs/node#433 and nodejs/node-gyp#564 |
@pksunkara what you mean by "We should not update npm" that we shouldn't release new version of the nom package? |
script: "npm install && npm test" | ||
before_install: | ||
- git submodule update --init --recursive | ||
- npm install -g npm@~1.4.6 | ||
- ruby -e "if '`npm -v`'<'2.0.0' then \`npm i -g npm\` else '' end" |
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.
ruby?
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 would have used shell or bash if I know how to do this. 😞
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.
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.
So if I understand it correctly Npm > 2.0 is required?
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.
This ruby logic can be simplified:
- ruby -e "if '`npm -v`'<'2.0.0' then \`npm i -g npm\` else '' end"
+ ruby -e "\`npm i -g npm\` if `npm -v` < '2.0.0'"
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.
👍
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.
So if I understand it correctly Npm > 2.0 is required?
Well, npm should be atleast 1.4.6. But I have trouble trying to do <
and >
operations on it. So, I used 2.0.0
which was easier to do those operations. Except 0.8
and 0.10
, all other versions have npm > 2.0.0
No, I meant that we should not update the version of npm which was installed by the io.js |
@zdne Updated the readme. |
Add compatibility for 0.11, 0.12 and iojs
For @zdne to review and merge.
Tested locally on nodejs 0.8, 0.10, 0.11, 0.12 and iojs 1.2