From ef31d27ba26921bd5ed058c506b6cc5a664666ad Mon Sep 17 00:00:00 2001 From: Totemancer Date: Wed, 9 Oct 2024 17:25:55 +0200 Subject: [PATCH] autoUpdater Improvements Added dynamic version to the feedURL to prevent unnecessary auto updates. --- apps/desktop/src/electron/autoUpdate.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/electron/autoUpdate.ts b/apps/desktop/src/electron/autoUpdate.ts index 990dd690e..0e7da35f2 100644 --- a/apps/desktop/src/electron/autoUpdate.ts +++ b/apps/desktop/src/electron/autoUpdate.ts @@ -1,4 +1,4 @@ -import { autoUpdater, BrowserWindow, webContents } from 'electron'; +import { app, autoUpdater, BrowserWindow, webContents } from 'electron'; export default class AppUpdate { constructor() { @@ -25,7 +25,8 @@ export default class AppUpdate { notify('Tonkeeper Pro is up to date', `Version 123`); //${releaseName}`); }); - const feedURL = 'https://update.electronjs.org/tonkeeper/tonkeeper-web/darwin-arm64/3.17.2'; + const appVersion = app.getVersion(); // Get the app version dynamically + const feedURL = `https://update.electronjs.org/tonkeeper/tonkeeper-web/darwin-arm64/${appVersion}`; autoUpdater.setFeedURL({ url: feedURL }); }