Expose publish command from top-level dir
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
|
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
|
||||||
"lerna:run": "lerna run",
|
"lerna:run": "lerna run",
|
||||||
"lerna:rebuild": "lerna run clean; lerna run build;",
|
"lerna:rebuild": "lerna run clean; lerna run build;",
|
||||||
"lerna:publish":
|
"publish":
|
||||||
"yarn install; lerna run clean; lerna run build; lerna publish --registry=https://registry.npmjs.org/"
|
"yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
|
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
|
||||||
|
@@ -102,7 +102,9 @@ const semverNameToIndex: { [semver: string]: number } = {
|
|||||||
async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) {
|
async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) {
|
||||||
// HACK: Lerna publish does not provide a way to specify multiple package versions as
|
// 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.
|
// 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) => {
|
child.stdout.on('data', (data: Buffer) => {
|
||||||
const output = data.toString('utf8');
|
const output = data.toString('utf8');
|
||||||
const isVersionPrompt = _.includes(output, 'Select a new version');
|
const isVersionPrompt = _.includes(output, 'Select a new version');
|
||||||
|
Reference in New Issue
Block a user