diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-25 03:37:01 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-25 03:57:47 +0800 |
commit | dbc798596b052d3e28cf5772c94789d37ee5a4c7 (patch) | |
tree | 9502dbee2b258c2f2053039925042172768fc8be /packages/monorepo-scripts/src/publish.ts | |
parent | c5859b65a395f31c87a3d3fbd303ed17156be09f (diff) | |
download | dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar.gz dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar.bz2 dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar.lz dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar.xz dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.tar.zst dexon-sol-tools-dbc798596b052d3e28cf5772c94789d37ee5a4c7.zip |
Replace dry mode with local publishing mode
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index f3c406eed..71eb16a98 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -16,7 +16,7 @@ import { utils } from './utils/utils'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; -const IS_DRY_RUN = process.env.IS_DRY_RUN === 'true'; +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,9 @@ const packageNameToWebsitePath: { [name: string]: string } = { const shouldIncludePrivate = true; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); - // await confirmDocPagesRenderAsync(updatedPublicPackages); + if (!IS_LOCAL_PUBLISH) { + await confirmDocPagesRenderAsync(allUpdatedPackages); + } // Update CHANGELOGs const updatedPublicPackages = _.filter(allUpdatedPackages, pkg => !pkg.packageJson.private); @@ -57,8 +59,8 @@ const packageNameToWebsitePath: { [name: string]: string } = { }); // Push changelog changes to Github - if (!IS_DRY_RUN) { - // await pushChangelogsToGithubAsync(); + if (!IS_LOCAL_PUBLISH) { + await pushChangelogsToGithubAsync(); } // Call LernaPublish @@ -180,9 +182,10 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; }).join(','); - const lernaPublishCmd = `node ${ - constants.lernaExecutable - } publish --cdVersions=${packageVersionString} --skip-git --yes --force-publish *`; + let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cdVersions=${packageVersionString}`; + if (IS_LOCAL_PUBLISH) { + lernaPublishCmd += ' --skip-git --yes --force-publish *'; + } utils.log('Lerna is publishing...'); await execAsync(lernaPublishCmd, { cwd: constants.monorepoRootPath }); } |