File tree 2 files changed +17
-15
lines changed
arduino-ide-extension/src
2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 1
- import { Command , CommandContribution , CommandRegistry } from '@theia/core' ;
1
+ import {
2
+ Command ,
3
+ CommandContribution ,
4
+ CommandRegistry ,
5
+ MessageService ,
6
+ } from '@theia/core' ;
2
7
import { injectable , inject } from 'inversify' ;
3
8
import { IDEUpdaterService } from '../../common/protocol/ide-updater-service' ;
4
9
5
10
@injectable ( )
6
11
export class IDEUpdaterCommands implements CommandContribution {
7
12
constructor (
8
13
@inject ( IDEUpdaterService )
9
- private readonly updater : IDEUpdaterService
14
+ private readonly updater : IDEUpdaterService ,
15
+ @inject ( MessageService )
16
+ protected readonly messageService : MessageService
10
17
) { }
11
18
12
19
registerCommands ( registry : CommandRegistry ) : void {
@@ -24,8 +31,9 @@ export class IDEUpdaterCommands implements CommandContribution {
24
31
} ) ;
25
32
}
26
33
27
- checkForUpdates ( ) {
28
- this . updater . checkForUpdates ( ) ;
34
+ async checkForUpdates ( ) {
35
+ const info = await this . updater . checkForUpdates ( ) ;
36
+ this . messageService . info ( `version ${ info . version } available` ) ;
29
37
}
30
38
31
39
downloadUpdate ( ) {
Original file line number Diff line number Diff line change 1
1
import { injectable } from '@theia/core/shared/inversify' ;
2
- import { AllPublishOptions } from 'builder-util-runtime' ;
2
+ import { GenericServerOptions } from 'builder-util-runtime' ;
3
3
import {
4
4
AppUpdater ,
5
5
AppImageUpdater ,
@@ -21,17 +21,11 @@ export class IDEUpdaterServiceImpl implements IDEUpdaterService {
21
21
protected theiaFEClient ?: IDEUpdaterServiceClient ;
22
22
23
23
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' ,
31
28
} ;
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
35
29
36
30
this . cancellationToken = new CancellationToken ( ) ;
37
31
if ( process . platform === 'win32' ) {
You can’t perform that action at this time.
0 commit comments