| 11 | autoUpdater.forceDevUpdateConfig = true |
| 12 | |
| 13 | export class LinuxUpdater implements Updater { |
| 14 | async check() { |
| 15 | const {updateInfo} = await autoUpdater.checkForUpdates() |
| 16 | const latest = updateInfo.version |
| 17 | const current = app.getVersion() |
| 18 | if (semver.lt(current, latest)) { |
| 19 | return latest |
| 20 | } else { |
| 21 | return null |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | async install() { |
| 26 | shell.openExternal(this.downloadUrl()) |
| 27 | } |
| 28 | |
| 29 | private downloadUrl() { |
| 30 | if (env.isInsiders) { |
| 31 | return pkg.repository + "/releases/latest" |
| 32 | } else { |
| 33 | return links.ZUI_DOWNLOAD |
| 34 | } |
| 35 | } |
| 36 | } |
nothing calls this directly
no outgoing calls
no test coverage detected