Skip to content

Commit 3ce8c46

Browse files
author
Dimitar Todorov
committed
fix: Support custom --outputDir with code signing
- Ensure custom outputDir always uses /CodePush subdirectory - Enable recursive directory creation for nested paths Fixes signature verification failures when using custom outputDir with privateKeyPath by maintaining correct ZIP structure that client SDK expects (CodePush/main.jsbundle).
1 parent df8ce76 commit 3ce8c46

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

script/command-executor.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function appRename(command: cli.IAppRenameCommand): Promise<void> {
217217

218218
export const createEmptyTempReleaseFolder = (folderPath: string) => {
219219
return deleteFolder(folderPath).then(() => {
220-
fs.mkdirSync(folderPath);
220+
fs.mkdirSync(folderPath, { recursive: true });
221221
});
222222
};
223223

@@ -1265,7 +1265,10 @@ export const release = (command: cli.IReleaseCommand): Promise<void> => {
12651265
export const releaseReact = (command: cli.IReleaseReactCommand): Promise<void> => {
12661266
let bundleName: string = command.bundleName;
12671267
let entryFile: string = command.entryFile;
1268-
const outputFolder: string = command.outputDir || path.join(os.tmpdir(), "CodePush");
1268+
let outputFolder: string = command.outputDir || path.join(os.tmpdir(), "CodePush");
1269+
if (command.outputDir && path.basename(outputFolder) !== "CodePush") {
1270+
outputFolder = path.join(outputFolder, "CodePush");
1271+
}
12691272
const platform: string = (command.platform = command.platform.toLowerCase());
12701273
const releaseCommand: cli.IReleaseCommand = <any>command;
12711274
// Check for app and deployment exist before releasing an update.

0 commit comments

Comments
 (0)