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

Serve .dmg for /download/ routes #53

Closed

Conversation

julienma
Copy link

Fixes #41 and #29.

Note: For the .dmg to be available, the .zip file must also exist.
This is because .dmg is served only on the darwin platform, which only exists if there's a .zip.

Note: Downloading the .dmg requires the .zip to exist.

This is because .dmg is served only on the darwin platform, which exists only if there's a .zip.
@julienma
Copy link
Author

Initially I thought we could have the dmg as a new platform, but the way aliases is made make it complicated.

E.g. /download/mac could match only 1 platform, either darwin or dmg.
This is not what we'd want.

We'd want /download/mac to match dmg platform, but /update/mac/:version to match darwin platform.

@julienma
Copy link
Author

In fact I'd rather download the dmg instead of the zip from the index page.

Maybe .dmg should be the default (on both /download and index page), and .zip should be served only on /update/...?

@RobbieTheWagner
Copy link
Contributor

@julienma I am trying to use your branch, so I merged it into my branch and deployed, but /download seems to still download the zip. Is there more setup required?

@julienma
Copy link
Author

@rwwagner90 no, it should work, as long as your .dmg doesn't contain blockmap in its filename (cf. https://github.com/zeit/hazel/pull/53/files#diff-63fdc6a01d0ec0cbf9772723f2356e46R131). Also, maybe restart / empty cache?

This is the same branch deployed on our prod, and visiting https://download.cashnotify.com/download/ from macOS, I get a .dmg.

FWIW, here's how we name our files:
image

@RobbieTheWagner
Copy link
Contributor

@julienma how do I restart / empty the cache? I did another release just to make sure it wasn't the old release being cached, and it's still downloading the zip.

My files look like this:

Screen Shot 2019-12-16 at 11 33 33 AM

@julienma
Copy link
Author

@rwwagner90 not sure what to do. What happens if you browse to /download/mac/ instead?

@RobbieTheWagner
Copy link
Contributor

@julienma /download/mac/ also downloads the zip. Do you think the zip containing the string darwin might be making that the darwin default somehow?

I merged in your branch into my existing Hazel project, perhaps I should also try cloning your fork directly and making a new app.

@julienma
Copy link
Author

@rwwagner90 actually I just saw there's been a fair amount of changes on master since I made that PR, and specifically one that's about serving .dmg: #69.

To be clear: my fork's built on top of 3.0.3, and current upstream is 3.1.0.
So if you applied this PR on top of current master, something weird's probably happening.

@RobbieTheWagner
Copy link
Contributor

@julienma would it be possible to update your fork to work with current master? I am going to try your fork directly as well, but in the hopes of getting this merged eventually, it probably needs to work with the current master.

@RobbieTheWagner
Copy link
Contributor

Alternatively, could you provide instructions on how to deploy and use your fork? I tried and I got an error that there was no now.json, so I copied the now.json from Hazel master and the app errors.

@julienma
Copy link
Author

@rwwagner90 I probably won't upgrade my PR for... weeks at best, so don't wait for me :)

As for now.json:

@RobbieTheWagner
Copy link
Contributor

@julienma do you have a private GitHub repo for CashNotify? I think shouldProxyPrivateDownload might be the issue.

@julienma
Copy link
Author

julienma commented Dec 16, 2019 via email

@RobbieTheWagner
Copy link
Contributor

@julienma I opened a new PR which I think should fix the issue for public and private.

@Aarbel
Copy link

Aarbel commented Feb 4, 2020

Same issue here, do you know a way to fix it ?
https://clovis-desktop-hazel-update-server.aarbel.now.sh/download/dmg
image

@Aarbel Aarbel mentioned this pull request Feb 4, 2020
@RobbieTheWagner
Copy link
Contributor

@Aarbel use my PR, it works #82

Would be awesome if we could get it merged, but it seems like this is not maintained.

@leo leo closed this in #82 Feb 6, 2020
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.

The /download route should return the DMG and not ZIP on macOS
3 participants