diff options
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 71eb16a98..d5238ab52 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -12,11 +12,11 @@ import semverSort = require('semver-sort'); import { constants } from './constants'; import { Package, PackageToNextVersion, VersionChangelog } from './types'; import { changelogUtils } from './utils/changelog_utils'; +import { configs } from './utils/configs'; import { utils } from './utils/utils'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; -const IS_LOCAL_PUBLISH = process.env.IS_LOCAL_PUBLISH === 'true'; const TODAYS_TIMESTAMP = moment().unix(); const packageNameToWebsitePath: { [name: string]: string } = { '0x.js': '0xjs', @@ -36,7 +36,7 @@ const packageNameToWebsitePath: { [name: string]: string } = { const shouldIncludePrivate = true; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); - if (!IS_LOCAL_PUBLISH) { + if (!configs.IS_LOCAL_PUBLISH) { await confirmDocPagesRenderAsync(allUpdatedPackages); } @@ -59,7 +59,7 @@ const packageNameToWebsitePath: { [name: string]: string } = { }); // Push changelog changes to Github - if (!IS_LOCAL_PUBLISH) { + if (!configs.IS_LOCAL_PUBLISH) { await pushChangelogsToGithubAsync(); } @@ -182,9 +182,11 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; }).join(','); - let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cdVersions=${packageVersionString}`; - if (IS_LOCAL_PUBLISH) { - lernaPublishCmd += ' --skip-git --yes --force-publish *'; + let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cdVersions=${packageVersionString} --registry=${ + configs.NPM_REGISTRY_URL + }`; + if (configs.IS_LOCAL_PUBLISH) { + lernaPublishCmd += ` --skip-git --yes --force-publish *`; } utils.log('Lerna is publishing...'); await execAsync(lernaPublishCmd, { cwd: constants.monorepoRootPath }); |