Add ability to pass specific dist tag to npm publish command from publishing flow
This commit is contained in:
@@ -252,6 +252,9 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string
|
||||
lernaPublishArgs.push('--no-git-tag-version');
|
||||
lernaPublishArgs.push('--no-push');
|
||||
}
|
||||
if (configs.DIST_TAG !== '') {
|
||||
lernaPublishArgs.push(`--dist-tag ${configs.DIST_TAG}`);
|
||||
}
|
||||
utils.log('Lerna is publishing...');
|
||||
try {
|
||||
const child = spawn(lernaPublishCmd, lernaPublishArgs, {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
const IS_LOCAL_PUBLISH = process.env.IS_LOCAL_PUBLISH === 'true';
|
||||
const DIST_TAG = process.env.DIST_TAG || '';
|
||||
const LOCAL_NPM_REGISTRY_URL = 'http://localhost:4873';
|
||||
const REMOTE_NPM_REGISTRY_URL = 'https://registry.npmjs.org/';
|
||||
|
||||
export const configs = {
|
||||
IS_LOCAL_PUBLISH,
|
||||
DIST_TAG,
|
||||
NPM_REGISTRY_URL: IS_LOCAL_PUBLISH ? LOCAL_NPM_REGISTRY_URL : REMOTE_NPM_REGISTRY_URL,
|
||||
DOCKER_HUB_ORG: '0xorg',
|
||||
};
|
||||
|
Reference in New Issue
Block a user