1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

[v4.2] handle auto-update to Lens 5 (#3155)

* electron 9.4.4 + electron-builder 22.10.5

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* handle auto-update to lens 5

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-06-23 09:22:00 +03:00 committed by GitHub
parent 8359c005c0
commit b51a53b173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ import { isDevelopment, isTestEnv } from "../common/vars";
import { delay } from "../common/utils";
import { areArgsUpdateAvailableToBackchannel, AutoUpdateLogPrefix, broadcastMessage, onceCorrect, UpdateAvailableChannel, UpdateAvailableToBackchannel } from "../common/ipc";
import { once } from "lodash";
import { app, ipcMain } from "electron";
import { ipcMain } from "electron";
let installVersion: null | string = null;
@ -13,7 +13,6 @@ function handleAutoUpdateBackChannel(event: Electron.IpcMainEvent, ...[arg]: Upd
if (arg.now) {
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
autoUpdater.quitAndInstall(true, true);
app.exit(); // this is needed for the installer not to fail on windows.
} else {
logger.info(`${AutoUpdateLogPrefix}: User chose to update on quit`);
autoUpdater.autoInstallOnAppQuit = true;
@ -35,6 +34,11 @@ export const startUpdateChecking = once(function (interval = 1000 * 60 * 60 * 24
autoUpdater.logger = logger;
autoUpdater.autoDownload = false;
autoUpdater.autoInstallOnAppQuit = false;
autoUpdater.setFeedURL({
provider: "s3",
bucket: "lens-binaries",
path: "/ide"
});
autoUpdater
.on("update-available", (info: UpdateInfo) => {