File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed
arduino-ide-extension/src Expand file tree Collapse file tree 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' ;
27import { injectable , inject } from 'inversify' ;
38import { IDEUpdaterService } from '../../common/protocol/ide-updater-service' ;
49
510@injectable ( )
611export 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 ( ) {
Original file line number Diff line number Diff line change 11import { injectable } from '@theia/core/shared/inversify' ;
2- import { AllPublishOptions } from 'builder-util-runtime' ;
2+ import { GenericServerOptions } from 'builder-util-runtime' ;
33import {
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' ) {
You can’t perform that action at this time.
0 commit comments