Skip to content

Commit

Permalink
autoUpdater Improvements
Browse files Browse the repository at this point in the history
Added dynamic version to the feedURL to prevent unnecessary auto updates.
  • Loading branch information
Totemancer authored Oct 9, 2024
1 parent 556b7d6 commit ef31d27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/desktop/src/electron/autoUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { autoUpdater, BrowserWindow, webContents } from 'electron';
import { app, autoUpdater, BrowserWindow, webContents } from 'electron';

export default class AppUpdate {
constructor() {
Expand All @@ -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 });
}
Expand Down

0 comments on commit ef31d27

Please sign in to comment.