GitbookIO / nuts

:chestnut: Releases/downloads server with auto-updater and GitHub as a backend
http://nuts.gitbook.com
Apache License 2.0
1.25k stars 299 forks source link

Add support for non-"stable" update release channels #95

Closed mzmousa closed 8 years ago

mzmousa commented 8 years ago

Addresses #86

jsloyer commented 8 years ago

@SamyPesse could you take a look at this?

SamyPesse commented 8 years ago

Really sorry for being late on this.

I'm not sure I understand this PR, Nuts already supports non-stable release channel (we are using it for our application).

Basically if you publish a tag 1.0.0 and 2.0.0-beta.1:

Then if you publish a version 2.0.0-beta.2, the user with version 1.0.0 will not be notified and the user with version 2.0.0-beta.1 will be notified and updated.

The only issue is when you publish a stable version of 2.0.0 and beta users switch to it, is it what you're trying to solve here?

joeferraro commented 8 years ago

@SamyPesse one of the benefits of this PR, as I see it, is the presence of update endpoints that allow you to specify channel. Unless I'm missing something, this seems to be missing in the master branch today.

mzmousa commented 8 years ago

@SamyPesse is your app an electron app? My automatic updates only work correctly with Nuts when I use the /update endpoints (which my PR adds support for) rather than the /download endpoints. I only use the /download to generate delta packages for Windows.

In my app, I'd like to have different release channels, and for a user to be able to update to a release channel of their choice (Right now we have stable and alpha channels), much like how Whatsie does it.

Squirrel Updates Server has this functionality, but my team is already using Nuts and it would be too much to move to that update server.

SamyPesse commented 8 years ago

Ok I understand now, I'll merge it tomorrow and release a new version.

joeferraro commented 8 years ago

I think it'd be beneficial to include tests that show intended behavior of various update calls that include a channel.

SamyPesse commented 8 years ago

@joeferraro I agree, more tests will be great (Nuts is not being tested enough, my fault..).

Maybe we could write a fake backend for testing and use something like supertest.

SamyPesse commented 8 years ago

I'm merging this PR, but I'll make some work (unit tests, etc) before publishing it.

weedgrease commented 7 years ago

Hey all - this doesn't seem to be working for me unless I'm doing something wrong. I currently have updates with these versions: v1.0.0 and v1.0.1 on the channel edge. Going to the url: https://myupdates.com/update/channel/edge/darwin/v1.0.1-edge results in url: /download/version/1.0.1/osx_64?filetype=zip.

This is incorrect as v1.0.1-edge is the most recent version on the edge channel. I would expect no url to be generated. Also the download url has no reference to the edge channel. Am I missing something? Thanks!

julienma commented 7 years ago

@kevingelion I have exactly the same issue with a beta channel. Did you find any solution?

julienma commented 7 years ago

@kevingelion you might want to have a look at #102, seems like your issue (was mine at least).

billygerhard commented 4 years ago

This was started over 3 years ago. Will this ever be tested and released?