You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Auto Update.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,17 +20,17 @@ Simplified auto-update is not supported for Squirrel.Windows.
20
20
21
21
**NOTICE**:
22
22
23
-
1. Do not call [setFeedURL](https://github.com/electron-userland/electron-builder/wiki/Auto-Update#autoupdatersetfeedurloptions). electron-builder automatically creates `app-update.yml` file for you on build in the `resources` (this file is internal, you don't need to be aware of it).
23
+
1. Do not call [setFeedURL](#module_electron-updater/out/AppUpdater.AppUpdater+setFeedURL). electron-builder automatically creates `app-update.yml` file for you on build in the `resources` (this file is internal, you don't need to be aware of it).
24
24
2. Bintray provider doesn't support [macOS auto-update](https://github.com/electron-userland/electron-builder/issues/1172) currently.
25
-
3. `zip` target for macOS is **required** for Squirrel.Mac, whereas `latest-mac.json` cannot be created, which causes `autoUpdater` error.
25
+
3. `zip` target for macOS is **required** for Squirrel.Mac, whereas `latest-mac.json` cannot be created, which causes `autoUpdater` error. Default [target](https://github.com/electron-userland/electron-builder/wiki/Options#MacOptions-target) for macOS `dmg`+`zip`, you don't need to explicitly specify target.
26
26
27
27
### Examples
28
28
29
-
**Auto Update**
29
+
#### Auto Update
30
30
31
31
A [complete example](https://github.com/iffy/electron-updater-example) showing how to use.
32
32
33
-
**Manual Update**
33
+
#### Manual Update
34
34
35
35
The following code snippet gives another example, which illustrate an encapsulated manual update via menu.
36
36
@@ -39,12 +39,13 @@ The following code snippet gives another example, which illustrate an encapsulat
function checkForUpdates (menuItem, focusedWindow, event) {
83
86
updater = menuItem
@@ -96,11 +99,14 @@ Import steps:
96
99
97
100
`latest.yml` (or `latest-mac.json`for macOS) will be generated and uploaded for all providers except `bintray` (because not required, `bintray` doesn't use `latest.yml`).
98
101
99
-
## Private Update Repo
102
+
## Private GitHub Update Repo
103
+
104
+
You can use a private repository for updates with electron-updater by setting the `GH_TOKEN` environment variable (on user machine) and `private` option.
105
+
If `GH_TOKEN` is set, electron-updater will use the GitHub API for updates allowing private repositories to work.
100
106
101
-
You can use a private repository forupdates withelectron-updater by setting the `GH_TOKEN` environment variable. If`GH_TOKEN` is set, electron-updater will use the GitHub APIfor updates allowing private repositories to work.
107
+
Only for [very special](https://github.com/electron-userland/electron-builder/issues/1393#issuecomment-288191885) cases — not intended and not suitable for all users.
102
108
103
-
**Note:** The GitHub API currently has a rate limit of5000 requests per user per hour. An update check uses up to 3 requests per check.If you are worried about hitting your rate limit, consider using [conditional requests](https://developer.github.com/v3/#conditional-requests) before checking for updates to reduce rate limit usage.
109
+
**Note:** The GitHub API currently has a rate limit of 5000 requests per user per hour. An update check uses up to 3 requests per check.
104
110
105
111
## Debugging
106
112
@@ -231,7 +237,7 @@ Emitted on progress. Only supported over Windows build, since `Squirrel.Mac` [do
231
237
232
238
| Param | Type |
233
239
| --- | --- |
234
-
| value |<code>[RequestHeaders](Developer-API#RequestHeaders)</code>|<code>null</code>|
240
+
| value | <code>[RequestHeaders](Developer-API#RequestHeaders)</code> \| <code>null</code> |
@@ -421,7 +427,7 @@ Configure update provider. If value is `string`, [module:electron-builder-http/o
421
427
422
428
| Param | Type | Description |
423
429
| --- | --- | --- |
424
-
| options |<code>[PublishConfiguration](Publishing-Artifacts#PublishConfiguration)</code>|<code>[GenericServerOptions](Publishing-Artifacts#GenericServerOptions)</code>|<code>[S3Options](Publishing-Artifacts#S3Options)</code>|<code>[BintrayOptions](Publishing-Artifacts#BintrayOptions)</code>|<code>[GithubOptions](Publishing-Artifacts#GithubOptions)</code>|<code>string</code>| If you want to override configuration in the `app-update.yml`. |
430
+
| options | <code>[PublishConfiguration](Publishing-Artifacts#PublishConfiguration)</code> \| <code>[GenericServerOptions](Publishing-Artifacts#GenericServerOptions)</code> \| <code>[S3Options](Publishing-Artifacts#S3Options)</code> \| <code>[BintrayOptions](Publishing-Artifacts#BintrayOptions)</code> \| <code>[GithubOptions](Publishing-Artifacts#GithubOptions)</code> \| <code>string</code> | If you want to override configuration in the `app-update.yml`. |
0 commit comments