Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

Commit 231613a

Browse files
authored
feat: add channel support to UpdaterOptions for controlling electron-updater yml file selection (#134)
1 parent efdf153 commit 231613a

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/core/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export type FeedURLOptions = Parameters<AppUpdater['setFeedURL']>[0];
1515

1616
export interface UpdaterOptions {
1717
feedURL?: FeedURLOptions | (() => Promise<FeedURLOptions>);
18+
channel?: string;
1819
}
1920

2021
export interface MainAppOptions {

src/main/updater/service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class UpdaterService {
3030
this.mainWindow = mainWindow;
3131

3232
if (!this.isAutoUpdaterSetup) {
33+
if (updaterOptions?.channel) {
34+
autoUpdater.channel = updaterOptions.channel;
35+
}
36+
3337
if (updaterOptions?.feedURL) {
3438
try {
3539
const resolved =

0 commit comments

Comments
 (0)