Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Automated npm upload? #117

Open
hansmbakker opened this issue Feb 11, 2017 · 3 comments
Open

Automated npm upload? #117

hansmbakker opened this issue Feb 11, 2017 · 3 comments

Comments

@hansmbakker
Copy link
Contributor

It would be great if there would be an automatic upload to the npm repository after the Travis builds finish, since that way people don't need to set up Scons etc before they can try out iotivity-node.

@gabrielschulhof
Copy link

The problem is that the binaries are very specific to each system. I'd have to provide binaries for Windows, OSX, and Linux, and I'm not 100% sure they'd all be binary-compatible etc. I suspect the npm package would be rather large if it contained all possible binaries. Additionally, I don't think I can get the Windows binaries and the OSX binaries into the same package, because they're created on different jobs and on different CI systems.

I'd have to set up some server that receives these binaries, performs the packaging and uploads a single npm package containing the binaries for all platforms. Then the postinstall script could remove binaries irrelevant to the local platform.

This sounds like a sizeable task with need for infrastructure support.

@hansmbakker
Copy link
Contributor Author

I understand what you're saying, I don't have experience with it either. However here is an old but interesting article to read: https://cylonjs.com/blog/2014/11/19/creating-multiplatform-precompiled-binaries-for-node-modules/

@gabrielschulhof
Copy link

There's another problem with pre-build binaries: we need to have a secure way of distributing them, and adding them to the npm package is not really an option because we'd have to add every possible arch for every possible platform (linux, windows, and OSX) into the package, which might make the package rather large, and containing lots of useless binaries.

OTOH, having npm download the binaries upon installation carries with it the responsibility of securely storing the binaries online. We must avoid them becoming compromised. This can get complicated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants