-
-
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
Documentation for Auto Update and Publishing Artifacts need clarification #1224
Comments
Thanks for donation and clear explanation. Let's solve step by step.
What is not clear in the "electron-builder automatically creates Why it is not clear that electron-builder automatically creates for you all required info? Or it is not clear that this configuration is taken from step 2 "Configure publish"? |
@antonycourtney I have successfully implemented auto-updates using electron-updater. You can check it out here - Another example - GH Tokenhttps://help.github.com/articles/creating-an-access-token-for-command-line-use/ How to generate it:You can generate a GitHub access token by going to https://github.com/settings/tokens/new. The access token should have the
Hope it helps 😄 |
@develar - Thanks for your help!
To begin with it's not clear exactly what file to modify to add the snippet shown in the example. Are you suggesting that developers can modify the automatically generated
It would be helpful (to me at least) to understand a little about what information electron-builder derives automatically from the publish step. At the very minimum, while the docs make it clear that one does not need to explicitly call |
@akashnimare Many thanks for this, and for the details on |
@antonycourtney Got it, thanks. Provided snipped should passed to setFeedURL. I will fix docs according to your excellent explanation. @akashnimare I will grab your text about Token ;) and will update docs. |
CLI flags — to electron-builder. Applicable locally as well. I will update docs. |
Worked example — @iffy? https://github.com/iffy/electron-updater-example |
cc @27percent |
Related: #1208 |
i agree with topic starter package says "nsis auto updater", does it mean it only works with nsis target release, need clarification if it works with squirrel too wiki says, it will generate app-update.yml and latest.yml, found first but not second file (generic provider), maybe because i use squirrel target
does that mean http will not work? in onshape example app, you use so far, this package bring 2 unnecessary files and confusion, whilst original just works, the only reason i want to use electron-updater is "download-progress" event, but i keep using original one, cause still can't figure out electron-updater another one good feature is releaseNotes, but no documentation too |
Fixed to
Squirrel.Windows is deprecated. For Squirrel.Windows you can use built-in updater.
Yes.
HTTP supported. Fixed to
To be documented. |
|
@develar it almost works -- I just need to try it with code signing. |
@iffy FYI it works perfectly (tried it with code sign) 🚀 |
I'm still not able to figure out how to get version, releaseName and releaseNotes. Despite of adding releaseName and releaseNotes in my latest-mac.json, info.releaseName and info.releaseNotes are undefined 😭 |
Hi @iffy -- Thanks so much for this example. The instructions are super clear, and it almost works for me. I managed to create and publish a release, install the publish release, bump the version number and republish. However, when I upgrade the version number and publish a new release, and then run the previous version, the application window looks like: Digging in to the log file, I see:
Unfortunately, it doesn't look like there's an easy way to see what URL is being used to check for updates. Which gets back to my previous question for @develar -- how is URL used to check for updates constructed? It's great that it is automatically generated, but when the update process isn't working, it's really necessary to know what the URL is and how's it's derived. Thanks for all the help -- almost there! |
...actually I see now what the problem was, the clue being production in:
I edited the release to uncheck the Thanks. I highly encourage changing the wiki pages to just link to this example, it makes the whole process quite clear. |
I think @antonycourtney is right: when there's an error trying to find a release on GitHub, it would be really helpful for the logs to say what URL was requested. I'm seeing the following:
Should I file a separate issue? |
@iffy I can's speak for you, but using electron 1.4.15, electron-builder 12.3.1 & electron-updater 1.4.2 on MacOS I'm getting log files containing the github request URL as follows:
I am having a bit of an issue with request timeout though, given the update isn't a small file, it takes a little while to download and electron updater doesn't seem to be waiting for the download to complete - on faster connections it seems to be fine, I'm guessing there's maybe a 1-2 minute timeout and if the download isn't complete in this time, the update stops and emits an error - is that roughly correct? |
@27percent Please file issue about timeout. |
@develar Will do, apologies, I should've stayed on-topic. Thanks for mentioning me so I'd get a notification by the way, this thread has been really helpful, I'm a lot closer to completing my project because of it |
CLI flags: added:
so, should be clear now. |
edited: docs published as md documents. |
https://github.com/electron-userland/electron-builder/wiki/Auto-Update#AppUpdater-signals |
@akashnimare With below code I could get hold of releaseNotes etc
|
@MarkusSvensson awesome. I'll try it out. |
Numerous aspects of the documentation on auto update and publishing artifacts omit many essential details. I'm sure it's the case that many of these details are "implicit mental context" that is obvious to the developers of electron-builder and those who have already used it extensively, but they make it difficult or impossible for a newcomer to understand how the process works and what's needed.
Auto Update Page
Example Project
To begin with: The Auto Update Page has a link to an Example Project.
I've cloned this example project and read the source for
AppUpdater.ts
and looked through all of the config files. Where is the configuration that determines the location where the app updater will fetch new releases? Nothing seemed obvious. Is it perhaps just pulling release artifacts fromgithub
directly as a default, based on therepository
ofpackage.json
? It would be really helpful if there was a sentence or two on theAuto Update
page clarifying this. If it's configured explicitly and I've overlooked it, would be helpful to have a link to the config file; if it's all done by defaults, it would be helpful to clarify that and mention where to place config settings to override those defaults.Configuring Alternative Provider in Quick Setup Guide
Step 4 of the Quick Setup Guide mentions that one should not explicitly call
setFeedURL
, and provides a short snippet showing how one can specify an explicit "provider":but where, exactly, does one place this configuration snippet? In what configuration file, and under what key? It's not clear.
Publishing Artifacts Page
This page mentions that Travis and AppVeyor are both supported. In the text that follows, are the configuration details and "CLI flags" referring to configuration and flags for these CI tools, or for electron-builder itself?
GH_TOKEN
This sentence:
could use some clarification. What is
GH_TOKEN
, what is its format, and what is the effect of setting this? In a typical build setup (or the example project), where would it be set?CLI Flags
Are these flags command line flags that should be passed to
electron-builder
(rather than to some other utility related to the build process or use of CI server)? I assume so, but it would be helpful to clarify.Are these CLI Flags only relevant when using a CI server, or are they also relevant when building and publishing a release manually? I suspect they are useful in both cases, but it would be good to clarify.
Worked Example
It would be tremendously helpful to have a worked example of the exact sequence of shell commands to be run after making a change to the source code to build and publish a new release.
Contribution and Thanks
I know I'm asking a lot with the above.
I am happy to contribute text or editing to help clarify any of the above if someone will answer the above questions and walk me through the process. I will also certainly make a donation to this great project to increase priority of this issue. Thanks for the great work developing
electron-builder
and thanks in advance for any help answering these questions.The text was updated successfully, but these errors were encountered: