Skip to content

Commit f8f970b

Browse files
author
Tsvetan Raikov
committed
Fixed build --forDevice command after prepare changes
1 parent e731324 commit f8f970b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/commands/build.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export class BuildCommandBase {
55
executeCore(args: string[], buildConfig?: IBuildConfig): IFuture<void> {
66
return (() => {
77
let platform = args[0].toLowerCase();
8-
this.$platformService.prepareAndBuild(platform, buildConfig, true).wait();
8+
this.$platformService.preparePlatform(platform, true).wait();
9+
this.$platformService.buildPlatform(platform, buildConfig).wait();
910
if(this.$options.copyTo) {
1011
this.$platformService.copyLastOutput(platform, this.$options.copyTo, {isForDevice: this.$options.forDevice}).wait();
1112
}

lib/services/platform-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export class PlatformService implements IPlatformService {
367367
}
368368

369369
private getBuildOutputPath(platform: string, platformData: IPlatformData, buildConfig?: IBuildConfig): string {
370-
let buildForDevice = buildConfig ? buildConfig.buildForDevice : false;
370+
let buildForDevice = buildConfig ? buildConfig.buildForDevice : this.$options.forDevice;
371371
if (platform === this.$devicePlatformsConstants.iOS.toLowerCase()) {
372372
return buildForDevice ? platformData.deviceBuildOutputPath : platformData.emulatorBuildOutputPath;
373373
}

0 commit comments

Comments
 (0)