Skip to content

Commit 759617b

Browse files
authored
Merge pull request #4840 from NativeScript/tachev/fix-snapshot
fix: disable the `watch` in release builds as its triggering 2 snapshot generations
2 parents 07f1a44 + 07149ee commit 759617b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/helpers/livesync-command-helper.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
6565
projectDir: this.$projectData.projectDir
6666
});
6767

68-
const buildData = this.$buildDataService.getBuildData(this.$projectData.projectDir, d.deviceInfo.platform, { ...this.$options.argv, outputPath, buildForDevice: !d.isEmulator });
68+
const buildData = this.$buildDataService.getBuildData(this.$projectData.projectDir, d.deviceInfo.platform, { ...this.$options.argv, outputPath, buildForDevice: !d.isEmulator, watch: !this.$options.release && this.$options.watch });
6969

7070
const buildAction = additionalOptions && additionalOptions.buildPlatform ?
7171
additionalOptions.buildPlatform.bind(additionalOptions.buildPlatform, d.deviceInfo.platform, buildData, this.$projectData) :
@@ -83,7 +83,7 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
8383
return info;
8484
});
8585

86-
return deviceDescriptors;
86+
return deviceDescriptors;
8787
}
8888

8989
public getPlatformsForOperation(platform: string): string[] {
@@ -133,7 +133,7 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
133133
return result;
134134
}
135135

136-
private async executeLiveSyncOperationCore(devices: Mobile.IDevice[], platform: string, additionalOptions?: ILiveSyncCommandHelperAdditionalOptions): Promise<{liveSyncInfo: ILiveSyncInfo, deviceDescriptors: ILiveSyncDeviceDescriptor[]}> {
136+
private async executeLiveSyncOperationCore(devices: Mobile.IDevice[], platform: string, additionalOptions?: ILiveSyncCommandHelperAdditionalOptions): Promise<{ liveSyncInfo: ILiveSyncInfo, deviceDescriptors: ILiveSyncDeviceDescriptor[] }> {
137137
if (!devices || !devices.length) {
138138
if (platform) {
139139
this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again.");

0 commit comments

Comments
 (0)