aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-26 18:14:13 +0800
committerFabio Berger <me@fabioberger.com>2018-07-26 18:14:13 +0800
commit88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00 (patch)
tree20933236b6fee4fa7fa89482bb5822a42f0c660a /packages/monorepo-scripts/src
parent6c5b33ec71edd0682af3875ee0dc20bb26529347 (diff)
downloaddexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar.gz
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar.bz2
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar.lz
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar.xz
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.tar.zst
dexon-sol-tools-88ee35d5f9a3d5497c6ffcf5f751be40cbaf7a00.zip
Call 'lerna publish' with spawn so we see stderr and stdout in real-time
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/publish.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 5992131db..8f140fc5a 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -4,7 +4,7 @@ import * as promisify from 'es6-promisify';
import * as _ from 'lodash';
import * as moment from 'moment';
import opn = require('opn');
-import { exec as execAsync } from 'promisify-child-process';
+import { exec as execAsync, spawn as spawnAsync } from 'promisify-child-process';
import * as prompt from 'prompt';
import semver = require('semver');
import semverSort = require('semver-sort');
@@ -189,7 +189,15 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string
lernaPublishCmd += ` --skip-git`;
}
utils.log('Lerna is publishing...');
- await execAsync(lernaPublishCmd, { cwd: constants.monorepoRootPath });
+ const child = await spawnAsync(lernaPublishCmd, { cwd: constants.monorepoRootPath });
+ child.stdout.on('data', (data: Buffer) => {
+ const output = data.toString('utf8');
+ utils.log('Stdout: ', output);
+ });
+ child.stderr.on('data', (data: Buffer) => {
+ const output = data.toString('utf8');
+ utils.log('Stderr: ', output);
+ });
}
function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string): string {