diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-30 21:27:47 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-30 21:27:47 +0800 |
commit | 08a69ebd6e9c04326836ab2ee486d1f1abe7c566 (patch) | |
tree | 09b3b7f375b1878e83461e4ba46c2117ca30b5d0 | |
parent | ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f (diff) | |
download | dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar.gz dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar.bz2 dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar.lz dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar.xz dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.tar.zst dexon-sol-tools-08a69ebd6e9c04326836ab2ee486d1f1abe7c566.zip |
Add more logging
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 9 | ||||
-rw-r--r-- | yarn.lock | 2 |
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.`, + ); } }); } @@ -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: |