-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Doc - Release using channels #2595
Changes from 3 commits
3528b2d
06ec156
a1944e5
43435e1
dedc0e9
130311e
83e7d48
a70e1ca
e2d0339
ea268be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,63 @@ | ||||
> !!! This documentation is in "beta" and needed to be tested !!! | ||||
|
||||
# Release using channels / Auto-updates with channels | ||||
|
||||
## Description | ||||
Channels are useful to distribute "beta" or "alpha" releases of your application to a choosen set of users. This allow to test an application before release it as "stable". | ||||
|
||||
Users which receive "beta" version will get "stable" versions too. Otherwise users who doesn't wanna "beta" will only get "stable" releases. | ||||
|
||||
They are tree channels level ordered by stability : | ||||
1. "stable", your application is stable and this is the default one (example: 1.3.2) | ||||
2. "beta" which mean your application works, but should have some bugs (example: 1.3.2-beta) | ||||
3. "alpha" which mean your application is not stable and in active development (example: 1.3.2-alpha) | ||||
|
||||
|
||||
## Configuration | ||||
To release using channels, you should config electron-builder and define the channels to use in client side. | ||||
|
||||
### Electron-Builder | ||||
By default (without using channels), all application releases use the "stable" channel. | ||||
|
||||
If you want to use channels, you should add this to your package.json: | ||||
|
||||
``` | ||||
"version": "x.x.x-beta", | ||||
... | ||||
"build": { | ||||
"generateUpdatesFilesForAllChannels": true, | ||||
... | ||||
} | ||||
``` | ||||
|
||||
> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you doesn't need to set it. | ||||
|
||||
All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for stable) to automatically build for the related channel. | ||||
|
||||
|
||||
### Your application | ||||
All you need to do here is to define which channel the user will receive. | ||||
|
||||
`autoUpdater.setFeedURL({url: 'https://www.yoursite.com', channel: 'beta'});` | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now user can set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm confused. Where do we set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||
|
||||
> note: remove the need to define url ! | ||||
|
||||
The following versions will be distributed to the users according to the channel you set in `setFeedURL()` : | ||||
- "stable": users will only get "stable" versions | ||||
- "beta": users will get "beta" and "stable" version | ||||
- "alpha": users will get "alpha", "beta" and "stable" version | ||||
|
||||
|
||||
### Advanced (optional) | ||||
todo: | ||||
- allow downgrade | ||||
- | ||||
|
||||
## How to use it / Example | ||||
Imagine your application version is 1.0.1 (stable). | ||||
|
||||
If you want to release a beta for the 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". | ||||
|
||||
And when your application is stable enouth and you want to release it to all users, only remove the "-beta" tag from the package.json "version" tag. | ||||
|
||||
|
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.
Please in the future use form "Header Must Use Capital Case".
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.
Thanks for the comment, I've change this.