From da8290914694272dfb549f0f3eea404c16ab1112 Mon Sep 17 00:00:00 2001 From: NovusTheory <3434404+NovusTheory@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:52:15 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Add=20configurable=20update=20fe?= =?UTF-8?q?ed=20from=20webpack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.ts | 4 +++- webpack.main.config.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 212c05513..98bead4f6 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -42,6 +42,8 @@ declare const SETTINGS_WINDOW_PRELOAD_WEBPACK_ENTRY: string; declare const YTM_VIEW_PRELOAD_WEBPACK_ENTRY: string; declare const YTMD_DISABLE_UPDATES: boolean; +declare const YTMD_UPDATE_FEED_OWNER: string; +declare const YTMD_UPDATE_FEED_REPOSITORY: string; const assetFolder = path.join(process.env.NODE_ENV === "development" ? path.join(app.getAppPath(), "src/assets") : process.resourcesPath); @@ -238,7 +240,7 @@ function shouldDisableUpdates() { // macOS cannot use the autoUpdater without a code signature at this time if (app.isPackaged && !shouldDisableUpdates() && !YTMD_DISABLE_UPDATES) { const updateServer = "https://update.electronjs.org"; - const updateFeed = `${updateServer}/ytmdesktop/ytmdesktop/${process.platform}-${process.arch}/${app.getVersion()}`; + const updateFeed = `${updateServer}/${YTMD_UPDATE_FEED_OWNER}/${YTMD_UPDATE_FEED_REPOSITORY}/${process.platform}-${process.arch}/${app.getVersion()}`; autoUpdater.setFeedURL({ url: updateFeed diff --git a/webpack.main.config.ts b/webpack.main.config.ts index ae63d0823..4a65bba71 100644 --- a/webpack.main.config.ts +++ b/webpack.main.config.ts @@ -28,7 +28,9 @@ export const mainConfig: Configuration = { }, plugins: [ new DefinePlugin({ - YTMD_DISABLE_UPDATES: false + YTMD_DISABLE_UPDATES: false, + YTMD_UPDATE_FEED_OWNER: "ytmdesktop", + YTMD_UPDATE_FEED_REPOSITORY: "ytmdesktop" }) ], resolve: {