Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue w/ outputDir in case of using code-signing #545

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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