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