@@ -336,7 +336,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
336
336
return true ;
337
337
}
338
338
let prepareInfo = this . $projectChangesService . getPrepareInfo ( platform , projectData ) ;
339
- let buildInfo = this . getBuildInfo ( platform , platformData , buildConfig . buildForDevice ) ;
339
+ let buildInfo = this . getBuildInfo ( platform , platformData , buildConfig ) ;
340
340
if ( ! prepareInfo || ! buildInfo ) {
341
341
return true ;
342
342
}
@@ -370,7 +370,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
370
370
} ) ;
371
371
await platformData . platformProjectService . buildProject ( platformData . projectRoot , projectData , buildConfig ) ;
372
372
let prepareInfo = this . $projectChangesService . getPrepareInfo ( platform , projectData ) ;
373
- let buildInfoFilePath = this . getBuildOutputPath ( platform , platformData , buildConfig . buildForDevice ) ;
373
+ let buildInfoFilePath = this . getBuildOutputPath ( platform , platformData , buildConfig ) ;
374
374
let buildInfoFile = path . join ( buildInfoFilePath , buildInfoFileName ) ;
375
375
let buildInfo : IBuildInfo = {
376
376
prepareTime : prepareInfo . changesRequireBuildTime ,
@@ -387,11 +387,11 @@ export class PlatformService extends EventEmitter implements IPlatformService {
387
387
return true ;
388
388
}
389
389
let deviceBuildInfo : IBuildInfo = await this . getDeviceBuildInfo ( device , projectData ) ;
390
- let localBuildInfo = this . getBuildInfo ( platform , platformData , ! device . isEmulator ) ;
390
+ let localBuildInfo = this . getBuildInfo ( platform , platformData , { buildForDevice : ! device . isEmulator } ) ;
391
391
return ! localBuildInfo || ! deviceBuildInfo || deviceBuildInfo . buildTime !== localBuildInfo . buildTime ;
392
392
}
393
393
394
- public async installApplication ( device : Mobile . IDevice , release : boolean , projectData : IProjectData ) : Promise < void > {
394
+ public async installApplication ( device : Mobile . IDevice , options : IRelease , projectData : IProjectData ) : Promise < void > {
395
395
this . $logger . out ( "Installing..." ) ;
396
396
let platformData = this . $platformsData . getPlatformData ( device . deviceInfo . platform , projectData ) ;
397
397
let packageFile = "" ;
@@ -405,9 +405,9 @@ export class PlatformService extends EventEmitter implements IPlatformService {
405
405
406
406
await device . applicationManager . reinstallApplication ( projectData . projectId , packageFile ) ;
407
407
408
- if ( ! release ) {
408
+ if ( ! options . release ) {
409
409
let deviceFilePath = await this . getDeviceBuildInfoFilePath ( device , projectData ) ;
410
- let buildInfoFilePath = this . getBuildOutputPath ( device . deviceInfo . platform , platformData , ! device . isEmulator ) ;
410
+ let buildInfoFilePath = this . getBuildOutputPath ( device . deviceInfo . platform , platformData , { buildForDevice : ! device . isEmulator } ) ;
411
411
let appIdentifier = projectData . projectId ;
412
412
413
413
await device . fileSystem . putFile ( path . join ( buildInfoFilePath , buildInfoFileName ) , deviceFilePath , appIdentifier ) ;
@@ -434,7 +434,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
434
434
}
435
435
436
436
if ( deployOptions . forceInstall || shouldBuild || ( await this . shouldInstall ( device , projectData ) ) ) {
437
- await this . installApplication ( device , deployOptions . release , projectData ) ;
437
+ await this . installApplication ( device , deployOptions , projectData ) ;
438
438
} else {
439
439
this . $logger . out ( "Skipping install." ) ;
440
440
}
@@ -492,9 +492,9 @@ export class PlatformService extends EventEmitter implements IPlatformService {
492
492
return this . runPlatform ( platform , emulateOptions , projectData ) ;
493
493
}
494
494
495
- private getBuildOutputPath ( platform : string , platformData : IPlatformData , buildForDevice : boolean ) : string {
495
+ private getBuildOutputPath ( platform : string , platformData : IPlatformData , options : IBuildForDevice ) : string {
496
496
if ( platform . toLowerCase ( ) === this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) {
497
- return buildForDevice ? platformData . deviceBuildOutputPath : platformData . emulatorBuildOutputPath ;
497
+ return options . buildForDevice ? platformData . deviceBuildOutputPath : platformData . emulatorBuildOutputPath ;
498
498
}
499
499
500
500
return platformData . deviceBuildOutputPath ;
@@ -515,8 +515,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
515
515
}
516
516
}
517
517
518
- private getBuildInfo ( platform : string , platformData : IPlatformData , buildForDevice : boolean ) : IBuildInfo {
519
- let buildInfoFilePath = this . getBuildOutputPath ( platform , platformData , buildForDevice ) ;
518
+ private getBuildInfo ( platform : string , platformData : IPlatformData , options : IBuildForDevice ) : IBuildInfo {
519
+ let buildInfoFilePath = this . getBuildOutputPath ( platform , platformData , options ) ;
520
520
let buildInfoFile = path . join ( buildInfoFilePath , buildInfoFileName ) ;
521
521
if ( this . $fs . exists ( buildInfoFile ) ) {
522
522
try {
0 commit comments