Skip to content

Commit db373c8

Browse files
author
Alberto Iannaccone
committed
configure updater options
1 parent 44d31ab commit db373c8

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

arduino-ide-extension/src/browser/ide-updater/ide-updater-commands.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
import { Command, CommandContribution, CommandRegistry } from '@theia/core';
1+
import {
2+
Command,
3+
CommandContribution,
4+
CommandRegistry,
5+
MessageService,
6+
} from '@theia/core';
27
import { injectable, inject } from 'inversify';
38
import { IDEUpdaterService } from '../../common/protocol/ide-updater-service';
49

510
@injectable()
611
export class IDEUpdaterCommands implements CommandContribution {
712
constructor(
813
@inject(IDEUpdaterService)
9-
private readonly updater: IDEUpdaterService
14+
private readonly updater: IDEUpdaterService,
15+
@inject(MessageService)
16+
protected readonly messageService: MessageService
1017
) {}
1118

1219
registerCommands(registry: CommandRegistry): void {
@@ -24,8 +31,9 @@ export class IDEUpdaterCommands implements CommandContribution {
2431
});
2532
}
2633

27-
checkForUpdates() {
28-
this.updater.checkForUpdates();
34+
async checkForUpdates() {
35+
const info = await this.updater.checkForUpdates();
36+
this.messageService.info(`version ${info.version} available`);
2937
}
3038

3139
downloadUpdate() {

arduino-ide-extension/src/node/ide-updater/ide-updater-service-impl.ts

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { injectable } from '@theia/core/shared/inversify';
2-
import { AllPublishOptions } from 'builder-util-runtime';
2+
import { GenericServerOptions } from 'builder-util-runtime';
33
import {
44
AppUpdater,
55
AppImageUpdater,
@@ -21,17 +21,11 @@ export class IDEUpdaterServiceImpl implements IDEUpdaterService {
2121
protected theiaFEClient?: IDEUpdaterServiceClient;
2222

2323
constructor() {
24-
const options: AllPublishOptions = {
25-
provider: 's3',
26-
bucket: '',
27-
region: '',
28-
acl: 'public-read',
29-
endpoint: 'https://{service}.{region}.amazonaws.com',
30-
channel: '',
24+
const options: GenericServerOptions = {
25+
provider: 'generic',
26+
url: 'https://downloads.arduino.cc/arduino-ide/nightly/test/',
27+
channel: 'beta',
3128
};
32-
// TODO: Search S3 bucket name for the two channels
33-
// https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0-rc2_Linux_64bit.zip
34-
// https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-latest_Linux_64bit.zip
3529

3630
this.cancellationToken = new CancellationToken();
3731
if (process.platform === 'win32') {

0 commit comments

Comments
 (0)