Skip to content

Conversation

@chabou
Copy link

@chabou chabou commented Sep 2, 2017

Fix #16

This feature is not yet documented in README.md but I'll do that after review

This PR adds 2 new routes /download/:platform/:arch and /update/:platform/:arch/:version.
arch parameter could be ia32 or x64 (same values than electron-builder).
If archis omitted, x64 is used by default.

When fetching/caching packages from Github release, it supposes that package is x64 except if its name, without extension, ends with i386, i686 or ia32.

Copy link
Contributor

@leo leo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! Now that it's reviewed, can you add the documentation to readme.md as well?

@leo
Copy link
Contributor

leo commented Oct 24, 2017

@chabou ping

Accepts a platform (like "darwin" or "win32") and an architecture (like "ia32", or "x64") to download the appropriate copy your app for. I generally suggest using either `process.platform()` ([more](https://nodejs.org/api/process.html#process_process_platform)) and `process.arch()` ([more](https://nodejs.org/api/process.html#process_process_arch)) to retrieve these strings.

If the cache isn't filled yet or doesn't contain a download link for the specified platform, it will respond like `/`.
If :arch parameter is missing, `x64` is used by default.
Copy link
Author

@chabou chabou Oct 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that a 404 is returned if cache isn't filled for this platform. See https://github.com/zeit/hazel/blob/2d54cb913cfd6ceb9ef491285f33ed74a2cd1847/lib/routes.js#L79-L81

@chabou
Copy link
Author

chabou commented Oct 31, 2017

I rebased this PR against master and add documentation for this feature.

@nnmrts
Copy link

nnmrts commented Jan 31, 2018

Hey! I'd like to help with 32bit support. @chabou made some commits, but I don't know what this means:

Conflicting files
lib/cache.js
lib/index.js
lib/routes.js

How can I help to resolve these conflicts?

@chabou
Copy link
Author

chabou commented Jan 31, 2018

@nnmrts This PR needs some rebase. But I don't know if @leo wants to merge this. Maybe not so useful.

@timneutkens
Copy link
Member

Going to close this since it's stale, I think we might still want to support this though 🤔 cc @leo

@timneutkens timneutkens closed this Dec 3, 2018
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

Successfully merging this pull request may close these issues.

4 participants