Skip to content

Commit a241ebc

Browse files
authored
Yosifov/improve clean option (#2675)
* Force rebuild when --clean option is passed to run cmd * Don't rebuild on every single change when clean flag applied
1 parent 67bbd2d commit a241ebc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/services/livesync/platform-livesync-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export abstract class PlatformLiveSyncServiceBase implements IPlatformLiveSyncSe
174174
let localToDevicePaths: Mobile.ILocalToDevicePathData[] = null;
175175
let isFullSync = false;
176176

177-
if (this.$options.clean || this.$projectChangesService.currentChanges.changesRequireBuild) {
177+
if (this.$projectChangesService.currentChanges.changesRequireBuild) {
178178
let buildConfig: IBuildConfig = {
179179
buildForDevice: !device.isEmulator,
180180
projectDir: this.$options.path,

lib/services/platform-service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
375375
return true;
376376
}
377377
if (buildConfig.clean) {
378-
return prepareInfo.time !== buildInfo.prepareTime;
378+
return true;
379379
}
380380
if (prepareInfo.time === buildInfo.prepareTime) {
381381
return false;
@@ -467,7 +467,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
467467
keyStoreAlias: deployOptions.keyStoreAlias,
468468
keyStoreAliasPassword: deployOptions.keyStoreAliasPassword,
469469
keyStorePassword: deployOptions.keyStorePassword,
470-
keyStorePath: deployOptions.keyStorePath
470+
keyStorePath: deployOptions.keyStorePath,
471+
clean: deployOptions.clean
471472
};
472473
let shouldBuild = await this.shouldBuild(platform, projectData, buildConfig);
473474
if (shouldBuild) {

0 commit comments

Comments
 (0)