Skip to content

Commit

Permalink
fix issue w/ outputDir in case of using code-signing (#545)
Browse files Browse the repository at this point in the history
relates to #544
  • Loading branch information
sergey-akhalkov committed Dec 13, 2017
1 parent c6a6f9f commit 54908f5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
40 changes: 20 additions & 20 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"email-validator": "^1.0.3",
"gradle-to-js": "^1.0.1",
"jsonwebtoken": "^7.4.1",
"mkdirp": "^0.5.1",
"moment": "^2.10.6",
"opener": "^1.4.1",
"parse-duration": "0.1.1",
Expand Down
9 changes: 8 additions & 1 deletion cli/script/command-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as chalk from "chalk";
var childProcess = require("child_process");
import debugCommand from "./commands/debug";
import * as fs from "fs";
var mkdirp = require("mkdirp");
var g2js = require("gradle-to-js/lib/parser");
import * as moment from "moment";
var opener = require("opener");
Expand Down Expand Up @@ -1287,6 +1288,12 @@ export var releaseReact = (command: cli.IReleaseReactCommand): Promise<void> =>
var outputFolder: string = command.outputDir || path.join(os.tmpdir(), "CodePush");
var platform: string = command.platform = command.platform.toLowerCase();
var releaseCommand: cli.IReleaseCommand = <any>command;

// we have to add "CodePush" root forlder to make update contents file structure
// to be compatible with React Native client SDK
outputFolder = path.join(outputFolder, "CodePush");
mkdirp.sync(outputFolder);

// Check for app and deployment exist before releasing an update.
// This validation helps to save about 1 minute or more in case user has typed wrong app or deployment name.
return validateDeployment(command.appName, command.deploymentName)
Expand Down Expand Up @@ -1348,7 +1355,7 @@ export var releaseReact = (command: cli.IReleaseReactCommand): Promise<void> =>
: getReactNativeProjectAppVersion(command, projectName);

if (command.outputDir) {
command.sourcemapOutput = path.join(command.outputDir, bundleName + ".map");
command.sourcemapOutput = path.join(releaseCommand.package, bundleName + ".map");
}

return appVersionPromise;
Expand Down

0 comments on commit 54908f5

Please sign in to comment.