Skip to content

Commit d5c9e09

Browse files
committed
chore: fix PR comments
1 parent 1232e2b commit d5c9e09

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

lib/services/android-project-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
348348
return nativescript && (nativescript.android || (nativescript.platforms && nativescript.platforms.android));
349349
}
350350

351-
public async stopServices(platformData: IPlatformData): Promise<ISpawnResult> {
351+
public async stopServices(projectRoot: string): Promise<ISpawnResult> {
352352
const result = await this.$gradleCommandService.executeCommand(["--stop", "--quiet"], {
353-
cwd: platformData.projectRoot,
353+
cwd: projectRoot,
354354
message: "Gradle stop services...",
355355
stdio: "pipe"
356356
});

lib/services/ios-project-service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
210210
this.$xcodebuildService.buildForSimulator(platformData, projectData, buildConfig));
211211
}
212212

213-
// TODO: Check if we need to validate the identifier here
214213
this.validateApplicationIdentifier(projectData);
215214
}
216215

lib/services/ios/export-options-plist-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ExportOptionsPlistService implements IExportOptionsPlistService {
4141
return { exportFileDir, exportFilePath, exportOptionsPlistFilePath };
4242
}
4343

44-
public createDistributionExportOptionsPlist(projectRoot: string, projectData: IProjectData, buildConfig: IBuildConfig): IExportOptionsPlistOutput {
44+
public createDistributionExportOptionsPlist(archivePath: string, projectData: IProjectData, buildConfig: IBuildConfig): IExportOptionsPlistOutput {
4545
const provision = buildConfig.provision || buildConfig.mobileProvisionIdentifier;
4646
const teamId = buildConfig.teamId;
4747
let plistTemplate = `<?xml version="1.0" encoding="UTF-8"?>
@@ -77,7 +77,7 @@ export class ExportOptionsPlistService implements IExportOptionsPlistService {
7777
const exportOptionsPlistFilePath = temp.path({ prefix: "export-", suffix: ".plist" });
7878
this.$fs.writeFile(exportOptionsPlistFilePath, plistTemplate);
7979

80-
const exportFileDir = path.resolve(path.join(projectRoot, "/build/archive"));
80+
const exportFileDir = path.resolve(path.dirname(archivePath));
8181
const exportFilePath = path.join(exportFileDir, projectData.projectName + ".ipa");
8282

8383
return { exportFileDir, exportFilePath, exportOptionsPlistFilePath };

lib/services/ios/xcodebuild-command-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export class XcodebuildCommandService implements IXcodebuildCommandService {
88
) { }
99

1010
public async executeCommand(args: string[], options: { cwd: string, stdio: string, message?: string, spawnOptions?: any }): Promise<ISpawnResult> {
11-
const { message, cwd, stdio = "inherit", spawnOptions } = options;
11+
const { message, cwd, stdio, spawnOptions } = options;
1212
this.$logger.info(message || "Xcode build...");
1313

14-
const childProcessOptions = { cwd, stdio };
14+
const childProcessOptions = { cwd, stdio: stdio || "inherit" };
1515

1616
try {
1717
const commandResult = await this.$childProcess.spawnFromEvent("xcodebuild",

lib/services/platform-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
694694
let errorMessage;
695695

696696
try {
697-
await platformData.platformProjectService.stopServices(platformData);
697+
await platformData.platformProjectService.stopServices(platformData.projectRoot);
698698
} catch (err) {
699699
errorMessage = err.message;
700700
}

test/tns-appstore-upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class AppStore {
6464
this.archiveCalls++;
6565
return "/Users/person/git/MyProject/platforms/ios/archive/MyProject.ipa";
6666
},
67-
buildForSimulator: async () => ({}),
67+
buildForSimulator: () => Promise.resolve(),
6868
buildForAppStore: async () => {
6969
this.archiveCalls++;
7070
return "/Users/person/git/MyProject/platforms/ios/archive/MyProject.ipa";

0 commit comments

Comments
 (0)