aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--packages/monorepo-scripts/src/publish.ts9
-rw-r--r--yarn.lock2
3 files changed, 11 insertions, 2 deletions
diff --git a/package.json b/package.json
index e513e452a..31b669bc7 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
"lerna:run": "lerna run",
"lerna:rebuild": "lerna run clean; lerna run build;",
- "publish":
+ "lerna:publish":
"yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js"
},
"config": {
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index a05cf6d04..8093cb66c 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -93,6 +93,11 @@ const semverNameToIndex: { [semver: string]: number } = {
utils.log(`Pushed CHANGELOG updates to Github`);
}
+ utils.log('Version updates to apply:');
+ _.each(packageToVersionChange, (versionChange: string, packageName: string) => {
+ utils.log(`${packageName} -> ${versionChange}`);
+ });
+ utils.log(`Calling 'lerna publish'...`);
await lernaPublishAsync(packageToVersionChange);
})().catch(err => {
utils.log(err);
@@ -121,6 +126,10 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin
const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?');
if (isFinalPrompt && !IS_DRY_RUN) {
child.stdin.write(`y\n`);
+ } else if (isFinalPrompt && IS_DRY_RUN) {
+ utils.log(
+ `Submitted all versions to Lerna but since this is a dry run, did not confirm. You need to CTRL-C to exit.`,
+ );
}
});
}
diff --git a/yarn.lock b/yarn.lock
index 9689f2b64..9f1cf1e87 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10218,7 +10218,7 @@ semaphore@>=1.0.1, semaphore@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa"
-semver-diff@^2.0.0:
+semver-diff@^2.0.0, semver-diff@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
dependencies: