-
-
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
Doc - Release using channels #2595
Conversation
@@ -0,0 +1,63 @@ | |||
> !!! This documentation is in "beta" and needed to be tested !!! | |||
|
|||
# Release using channels / Auto-updates with channels |
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.
### 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Now user can set channel
, setFeedURL
not required, right?
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.
I'm confused. Where do we set channel
?
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.
Oh this:
set channel(value: string | null) { |
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.
One scary section to me was:
Might want to modify this as well :) |
578a60b
to
667b982
Compare
667b982
to
f31a826
Compare
|
||
`autoUpdater.channel('beta')` | ||
`autoUpdater.channel('beta')` (see [the documentation here](../auto-update.md#module_electron-updater.AppUpdater+channel)) |
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.
I have been doing autoUpdater.channel = 'beta'
. Is this valid as well ?
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.
@kwent my bad.. channel('beta') is false. I will correct this.
8b365c1
to
130311e
Compare
|
||
Users which receive "beta" version will get "stable" versions too. Otherwise, users who don't want "beta" will only get "stable" releases. | ||
|
||
They are tree channels level ordered by stability: |
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.
typo. i think you meant to say "There are three channels, ordered by stability"
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 ! Yes this is exactly what I'm trying to say ;)
9880d01
to
83e7d48
Compare
LGTM. One thing i saw is if i set channel to Might not be the best place and might be worst opening an issue instead tho. cc @develar Update: Found a previous comment from you @popod. So is it |
@kwent thanks: this is an error! The channels to use are @develar do you see an other possibility ? Like as example set the channel to
And do you think that this is useful to limit the channel to |
Maybe we can alias stable to latest ? cc @develar
|
No, user should be able to use whatever he want. But! Where do you set? updater.channel or electron-builder publish config channel? |
Obviously, that you cannot set updater.channel to
|
@develar as I wrote in my latest comment, do you think that it is possible to do this: When doing
With |
Yeach... you are right.
Well... no channel means that channels are not used and default name of update file is Need to think about it. We cannot map Possible solution — if |
Thanks for your reply @develar ! I understand and agree with the fact that we should no do "magic transformation" :) I think that the auto-updater should be "compatible" if we use I will do it tomorrow. If you have an other solution, let me know ;) |
Been loosely following this thread, and have actually got this multi-channel support working in my app. So, thanks for these WIP docs! Isn't the feature already complete? Are we discussing improving how it works, or just documenting the way it currently works? At the risk of getting off topic... I was definitely annoyed and disappointed that I had to use these magic variable names ("alpha" -> "beta" -> "latest"). For my workflow, I want "canary" -> "preview" -> "release". I think hardcoding these release channel names is a very weird idea. Not only does it limit functionality, it's less clear how they relate. If you let the user define the flow of channels themselves, they can customize whatever (and however many) make sense for their application, and it also will likely make more sense overall since they set up the relationships themselves. There should be a new concept introduced in this release channels feature, one of channel order. I think in the build settings, defining an ordered array would be great. Maybe, if you wanted to keep a sane default around, you could make
Or, if you want something else as I'd like to you could define your own array:
If Also, FWIW, |
@jake Thanks for your feedback !
Here, I think we should only "documenting the way it currently works". But we think about improving it too :) Auto update with channel is available since a few month and no documentation existe about it until now.. As we discuss here: #1182 (comment), I already have suggest to let the user define it's own "channel name". But we kept things simple for the first working implementation. I think that we should keep the "stable, beta, alpha" channels by default to provide an "easy to use" functionality, but allow advanced users to change this.. I don't know what think @develar about that, but I think we could open a new issue for let the users chose their "channels names" and the related order. I really think this is a pretty feature ! |
Complete.
Well, this option does exactly what name means — generates update info files for all channels :) As update info files is generated and uploaded, your users get updates. @jake Do you realise and understand, that
@jake Do you use semver or not? I mean — |
BTW, right now nothing stops you :) But it is your responsibility to copy/create/upload such update info files in this case right now. And thanks a lot to @popod, it is not good — electron-builder should help you to avoid manual uploading/copying. |
Sorry, I don't quite follow what you're asking. I also just wanted to reiterate I'm just trying to be helpful by providing some real world feedback :) I don't use semver, as I think it's very non-human-friendly. I try to build software for humans, not robots. I understand its value in internal library world, but Electron is for end users. I'm not sure how relevant it is to this discussion, but here's our versioning strategy. Ideally the names would be what I described earlier. FWIW, Framer.js also uses a similar whole-version-number strategy. my non-standard versioning strategyPer the release channel docs (issue, pull), there are three release channels: Alpha, Beta, Stable. Build artifacts have their version number (and thus their release channel) in the filename. Once you download a release from a channel, you are subscribed to that channel. You can easily switch by downloading a release from a different channel. Conceptually, we are working on AlphaRolling time-based snapshots. Version is next potential for "Stable" channel. Internal only, bleeding edge. Commonly broken. Possibly CI-driven every commit.
Note: Subscribers of Alpha also receives updates published to Beta and Stable. BetaLatest snapshot promoted to Beta channel for consideration. Limited pool of external testers. Supposed to work and be ready for public consumption.
In the event a beta release has an issue, we issue hotfixes to the Beta channel.
Note: we'd also be issuing additional releases on the Snapshot channel, e.g. Note: Subscribers of Beta also receives updates published to Stable. Consider: TIMESTAMP on hotfix releases?
StableThe publicly consumed versions. Guaranteed to work, as they passed through Snapshot and Beta channels. Only ever whole major versions with zeroed minor and patch versions.
Note: Subscribers of Stable only receive updates to Stable. In your example, is it not still pushing to both the currently selected channel and any channels it supersedes?
Isn't this always the case? Release channels cascade down. You never push a channel release "upstream"-- you wouldn't build an
How so? I have this option enabled, and when I publish an "alpha" build my "latest" release file is not regenerated, or even re-uploaded as far as I can tell. Doesn't this option control the feature that pushes releases to downstream channels in addition to the selected channel?
Are you proposing I fork |
These values are not harcoded — you can use any channel name as you want (but in this case electron-builder cannot help you to upload/regenerate corresponding update info files).
Yes. Because Ok... so, as far I see from your example versions, you use pre-release version tags |
Oh, I see. I guess I'm somewhat conflating arbitrary release channels with the "sorted" hierarchical release channels as I've been describing (e.g. canary -> preview -> release). The
Pretty much! I'm fighting against Anyway, if I can be of any help testing the future fully-customizable release channel hierarchy I'm game! |
Ok. So, @jake just want ability to setup own mappings. Default for now latest, beta, alpha. Here latest is not clear and probably we should rename it to stable. I propose — if option generateUpdatesFilesForAllChannels is set to true, cascade stable-beta-alpha is used. Latest is not generated at all. If set to array of string, each item it is a pre-release component except the first element — first It is name of a stable channel. And so, updater.channel will forbid empty/null channel name to ensure that developer aware of default channel name). |
I'd challenge this idea. I think it might make most sense to have "latest" always mean "ready for production". Would also make it easier to adopt named release channels later after already shipping your app. Otherwise, you need to account for apps in the wild that are subscribed to I think if the definition of "latest" is just well defined, it can be clear enough. It might be more confusing introducing a new word, "stable"?
Smart- so cascade the array of channels down, from most stable to lease. Then it's easy to do |
Oh, just to clarify: Have "latest" always mean "ready for production" unless you've defined your own release channel list. In which case, the first entry in your list represents "ready for production", and it's whatever name you've chosen for it. |
Hmm... currently, we detect it using prerelease component of current app version. If no pre release component — only Most-stable channel file will be generated. |
LGTM |
For those looking for a link to the docs. |
todo: