mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-14 12:49:28 +00:00
configure updater options
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { Command, CommandContribution, CommandRegistry } from '@theia/core';
|
||||
import {
|
||||
Command,
|
||||
CommandContribution,
|
||||
CommandRegistry,
|
||||
MessageService,
|
||||
} from '@theia/core';
|
||||
import { injectable, inject } from 'inversify';
|
||||
import { IDEUpdaterService } from '../../common/protocol/ide-updater-service';
|
||||
|
||||
@@ -6,7 +11,9 @@ import { IDEUpdaterService } from '../../common/protocol/ide-updater-service';
|
||||
export class IDEUpdaterCommands implements CommandContribution {
|
||||
constructor(
|
||||
@inject(IDEUpdaterService)
|
||||
private readonly updater: IDEUpdaterService
|
||||
private readonly updater: IDEUpdaterService,
|
||||
@inject(MessageService)
|
||||
protected readonly messageService: MessageService
|
||||
) {}
|
||||
|
||||
registerCommands(registry: CommandRegistry): void {
|
||||
@@ -24,8 +31,9 @@ export class IDEUpdaterCommands implements CommandContribution {
|
||||
});
|
||||
}
|
||||
|
||||
checkForUpdates() {
|
||||
this.updater.checkForUpdates();
|
||||
async checkForUpdates() {
|
||||
const info = await this.updater.checkForUpdates();
|
||||
this.messageService.info(`version ${info.version} available`);
|
||||
}
|
||||
|
||||
downloadUpdate() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { AllPublishOptions } from 'builder-util-runtime';
|
||||
import { GenericServerOptions } from 'builder-util-runtime';
|
||||
import {
|
||||
AppUpdater,
|
||||
AppImageUpdater,
|
||||
@@ -21,17 +21,11 @@ export class IDEUpdaterServiceImpl implements IDEUpdaterService {
|
||||
protected theiaFEClient?: IDEUpdaterServiceClient;
|
||||
|
||||
constructor() {
|
||||
const options: AllPublishOptions = {
|
||||
provider: 's3',
|
||||
bucket: '',
|
||||
region: '',
|
||||
acl: 'public-read',
|
||||
endpoint: 'https://{service}.{region}.amazonaws.com',
|
||||
channel: '',
|
||||
const options: GenericServerOptions = {
|
||||
provider: 'generic',
|
||||
url: 'https://downloads.arduino.cc/arduino-ide/nightly/test/',
|
||||
channel: 'beta',
|
||||
};
|
||||
// TODO: Search S3 bucket name for the two channels
|
||||
// https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0-rc2_Linux_64bit.zip
|
||||
// https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-latest_Linux_64bit.zip
|
||||
|
||||
this.cancellationToken = new CancellationToken();
|
||||
if (process.platform === 'win32') {
|
||||
|
||||
Reference in New Issue
Block a user