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

relates to https://github.com/Microsoft/code-push/issues/544
This commit is contained in:
Sergey Akhalkov 2017-12-13 01:46:29 -08:00 коммит произвёл GitHub
Родитель c6a6f9fe03
Коммит 54908f51e6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 29 добавлений и 21 удалений

40
cli/package-lock.json сгенерированный
Просмотреть файл

@ -154,7 +154,7 @@
"slash": "1.0.0", "slash": "1.0.0",
"superagent": "1.8.5", "superagent": "1.8.5",
"superagent-proxy": "1.0.2", "superagent-proxy": "1.0.2",
"yazl": "2.4.2" "yazl": "2.4.3"
} }
}, },
"colors": { "colors": {
@ -605,9 +605,9 @@
} }
}, },
"i": { "i": {
"version": "0.3.5", "version": "0.3.6",
"resolved": "https://registry.npmjs.org/i/-/i-0.3.5.tgz", "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz",
"integrity": "sha1-HSuFQVjsgWkRPGy39raAHpniEdU=" "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0="
}, },
"iconv-lite": { "iconv-lite": {
"version": "0.4.19", "version": "0.4.19",
@ -639,9 +639,9 @@
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
}, },
"ini": { "ini": {
"version": "1.3.4", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
}, },
"invert-kv": { "invert-kv": {
"version": "1.0.0", "version": "1.0.0",
@ -734,7 +734,7 @@
"requires": { "requires": {
"hoek": "2.16.3", "hoek": "2.16.3",
"isemail": "1.2.0", "isemail": "1.2.0",
"moment": "2.18.1", "moment": "2.19.4",
"topo": "1.1.0" "topo": "1.1.0"
} }
}, },
@ -873,9 +873,9 @@
} }
}, },
"moment": { "moment": {
"version": "2.18.1", "version": "2.19.4",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.4.tgz",
"integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" "integrity": "sha512-1xFTAknSLfc47DIxHDUbnJWC+UwgWxATmymaxIPQpmMh7LBm7ZbwVEsuushqwL2GYZU0jie4xO+TK44hJPjNSQ=="
}, },
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
@ -1180,12 +1180,12 @@
} }
}, },
"rc": { "rc": {
"version": "1.2.1", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz",
"integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=",
"requires": { "requires": {
"deep-extend": "0.4.2", "deep-extend": "0.4.2",
"ini": "1.3.4", "ini": "1.3.5",
"minimist": "1.2.0", "minimist": "1.2.0",
"strip-json-comments": "2.0.1" "strip-json-comments": "2.0.1"
}, },
@ -1288,7 +1288,7 @@
"resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz",
"integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=",
"requires": { "requires": {
"rc": "1.2.1" "rc": "1.2.2"
} }
}, },
"repeating": { "repeating": {
@ -1587,7 +1587,7 @@
"requires": { "requires": {
"async": "0.2.10", "async": "0.2.10",
"deep-equal": "1.0.1", "deep-equal": "1.0.1",
"i": "0.3.5", "i": "0.3.6",
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"ncp": "0.4.2", "ncp": "0.4.2",
"rimraf": "2.6.2" "rimraf": "2.6.2"
@ -1768,9 +1768,9 @@
} }
}, },
"yazl": { "yazl": {
"version": "2.4.2", "version": "2.4.3",
"resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.2.tgz", "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz",
"integrity": "sha1-FMsZCD4eJacAksFYiqvg9OTdTYg=", "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE=",
"requires": { "requires": {
"buffer-crc32": "0.2.13" "buffer-crc32": "0.2.13"
} }

Просмотреть файл

@ -32,6 +32,7 @@
"email-validator": "^1.0.3", "email-validator": "^1.0.3",
"gradle-to-js": "^1.0.1", "gradle-to-js": "^1.0.1",
"jsonwebtoken": "^7.4.1", "jsonwebtoken": "^7.4.1",
"mkdirp": "^0.5.1",
"moment": "^2.10.6", "moment": "^2.10.6",
"opener": "^1.4.1", "opener": "^1.4.1",
"parse-duration": "0.1.1", "parse-duration": "0.1.1",

Просмотреть файл

@ -5,6 +5,7 @@ import * as chalk from "chalk";
var childProcess = require("child_process"); var childProcess = require("child_process");
import debugCommand from "./commands/debug"; import debugCommand from "./commands/debug";
import * as fs from "fs"; import * as fs from "fs";
var mkdirp = require("mkdirp");
var g2js = require("gradle-to-js/lib/parser"); var g2js = require("gradle-to-js/lib/parser");
import * as moment from "moment"; import * as moment from "moment";
var opener = require("opener"); var opener = require("opener");
@ -1287,6 +1288,12 @@ export var releaseReact = (command: cli.IReleaseReactCommand): Promise<void> =>
var outputFolder: string = command.outputDir || path.join(os.tmpdir(), "CodePush"); var outputFolder: string = command.outputDir || path.join(os.tmpdir(), "CodePush");
var platform: string = command.platform = command.platform.toLowerCase(); var platform: string = command.platform = command.platform.toLowerCase();
var releaseCommand: cli.IReleaseCommand = <any>command; 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. // 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. // 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) return validateDeployment(command.appName, command.deploymentName)
@ -1348,7 +1355,7 @@ export var releaseReact = (command: cli.IReleaseReactCommand): Promise<void> =>
: getReactNativeProjectAppVersion(command, projectName); : getReactNativeProjectAppVersion(command, projectName);
if (command.outputDir) { if (command.outputDir) {
command.sourcemapOutput = path.join(command.outputDir, bundleName + ".map"); command.sourcemapOutput = path.join(releaseCommand.package, bundleName + ".map");
} }
return appVersionPromise; return appVersionPromise;