aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-30 21:07:24 +0800
committerFabio Berger <me@fabioberger.com>2018-03-30 21:07:24 +0800
commitddb8e26becb3f8d5bd8426663dbdea2cf1bf484f (patch)
tree2357a54a8c43ea1d35e5adbc1e6574a14dfc4634
parent1eff120f49a89e82a975d18dd986639dd6ddbf21 (diff)
downloaddexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar.gz
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar.bz2
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar.lz
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar.xz
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.tar.zst
dexon-sol-tools-ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f.zip
Expose publish command from top-level dir
-rw-r--r--package.json4
-rw-r--r--packages/monorepo-scripts/src/publish.ts4
2 files changed, 5 insertions, 3 deletions
diff --git a/package.json b/package.json
index 0e5b7a257..e513e452a 100644
--- a/package.json
+++ b/package.json
@@ -11,8 +11,8 @@
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
"lerna:run": "lerna run",
"lerna:rebuild": "lerna run clean; lerna run build;",
- "lerna:publish":
- "yarn install; lerna run clean; lerna run build; lerna publish --registry=https://registry.npmjs.org/"
+ "publish":
+ "yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js"
},
"config": {
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 3de382c50..a05cf6d04 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -102,7 +102,9 @@ const semverNameToIndex: { [semver: string]: number } = {
async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) {
// HACK: Lerna publish does not provide a way to specify multiple package versions as
// flags so instead we need to interact with their interactive prompt interface.
- const child = spawn('lerna', ['publish'], { cwd: constants.monorepoRootPath });
+ const child = spawn('lerna', ['publish', '--registry=https://registry.npmjs.org/'], {
+ cwd: constants.monorepoRootPath,
+ });
child.stdout.on('data', (data: Buffer) => {
const output = data.toString('utf8');
const isVersionPrompt = _.includes(output, 'Select a new version');