MCPcopy
hub / github.com/brimdata/zui / LinuxUpdater

Class LinuxUpdater

apps/zui/src/domain/updates/linux-updater.ts:13–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11autoUpdater.forceDevUpdateConfig = true
12
13export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected