Skip to content

Commit 4f40f34

Browse files
committed
SDA-4181 Check beta auto-update channel from ACP
1 parent 61805ae commit 4f40f34

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

config/Symphony.config

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
},
4343
"autoLaunchPath": "",
4444
"userDataPath": "",
45-
"chromeFlags": ""
45+
"chromeFlags": "",
46+
"betaAutoUpdateChannelEnabled": true
4647
}

src/app/auto-update-handler.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,21 @@ export class AutoUpdate {
222222
};
223223

224224
private getGenericServerOptions = (): GenericServerOptions => {
225-
const { autoUpdateChannel } = config.getConfigFields(['autoUpdateChannel']);
225+
let userAutoUpdateChannel;
226+
const { autoUpdateChannel, betaAutoUpdateChannelEnabled } =
227+
config.getConfigFields([
228+
'autoUpdateChannel',
229+
'betaAutoUpdateChannelEnabled',
230+
]);
231+
userAutoUpdateChannel = betaAutoUpdateChannelEnabled
232+
? 'beta'
233+
: autoUpdateChannel;
234+
logger.info(`auto-update-handler: using channel ${userAutoUpdateChannel}`);
235+
226236
const opts: GenericServerOptions = {
227237
provider: 'generic',
228238
url: this.getUpdateUrl(),
229-
channel: autoUpdateChannel || null,
239+
channel: userAutoUpdateChannel || null,
230240
};
231241
return opts;
232242
};

src/app/config-handler.ts

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export interface IConfig {
6060
startedAfterAutoUpdate?: boolean;
6161
enableBrowserLogin?: boolean;
6262
browserLoginAutoConnect?: boolean;
63+
betaAutoUpdateChannelEnabled?: boolean;
6364
}
6465

6566
export interface IGlobalConfig {
@@ -99,6 +100,7 @@ export interface IPodLevelEntitlements {
99100
}
100101

101102
export interface IACPFeatureLevelEntitlements {
103+
betaAutoUpdateChannelEnabled: boolean;
102104
devToolsEnabled: boolean;
103105
permissions: IPermission;
104106
}
@@ -449,6 +451,8 @@ class Config {
449451
autoLaunchPath: latestGlobalConfig.autoLaunchPath,
450452
userDataPath: latestGlobalConfig.userDataPath,
451453
customFlags: latestGlobalConfig.customFlags,
454+
betaAutoUpdateChannelEnabled:
455+
latestGlobalConfig.betaAutoUpdateChannelEnabled,
452456
});
453457
}
454458

0 commit comments

Comments
 (0)