diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-27 22:28:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-27 22:28:57 +0800 |
commit | b8241c0f808518a3f727424cacb952cc9ce80c4c (patch) | |
tree | 309abba264ea3578cefdc8d7a4f53ef482ff26c9 /packages/monorepo-scripts | |
parent | fe7a8be98c32c6aed8548574e67e36962db732fb (diff) | |
parent | f4a4fefe422a5b2140d5bb394a7f06f842352c69 (diff) | |
download | dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar.gz dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar.bz2 dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar.lz dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar.xz dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.tar.zst dexon-sol-tools-b8241c0f808518a3f727424cacb952cc9ce80c4c.zip |
Merge branch 'development' into dev-dropdown
* development: (120 commits)
Exit with non-error code at end of publishRelease
Publish
Updated CHANGELOGS
Fix prettier
Update changelog files for RC packages
Skip doc generation for local publishes since we test this in a separate CI test
Fix typo
Use absolute path
Run yarn a second time if the first fails
Try relative to root dir
Fix command
Move md files to lib folder during build
Change exit code to failure
Fix sra-spec `main` and `types` in package.json
Actual relative path
Try relative path
Issue #1025 BlockParam unroll
Fix command
Move md files to lib folder during build
Fix sra-spec `main` and `types` in package.json
...
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/package.json | 2 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 11 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/publish_release_notes.ts | 1 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/test_installation.ts | 6 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/utils/changelog_utils.ts | 5 |
5 files changed, 12 insertions, 13 deletions
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 551695129..a2f2343b8 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0xproject/monorepo-scripts", - "version": "1.0.5", + "version": "1.0.7", "engines": { "node": ">=6.12" }, diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index d9e09bdeb..646818c58 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -18,7 +18,6 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils import { publishReleaseNotesAsync } from './utils/github_release_utils'; import { utils } from './utils/utils'; -const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; const TODAYS_TIMESTAMP = moment().unix(); @@ -75,9 +74,11 @@ async function confirmAsync(message: string): Promise<void> { }); utils.log(`Calling 'lerna publish'...`); await lernaPublishAsync(packageToNextVersion); - const isStaging = false; - const shouldUploadDocs = !configs.IS_LOCAL_PUBLISH; - await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs); + if (!configs.IS_LOCAL_PUBLISH) { + const isStaging = false; + const shouldUploadDocs = true; + await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs); + } const isDryRun = configs.IS_LOCAL_PUBLISH; await publishReleaseNotesAsync(updatedPublicPackages, isDryRun); })().catch(err => { @@ -88,7 +89,7 @@ async function confirmAsync(message: string): Promise<void> { function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { const rootPackageJsonPath = `${constants.monorepoRootPath}/package.json`; const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath).toString()); - const packagesWithDocPagesStringIfExist = _.get(rootPackageJson, 'configs.packagesWithDocPages', undefined); + const packagesWithDocPagesStringIfExist = _.get(rootPackageJson, 'config.packagesWithDocPages', undefined); if (_.isUndefined(packagesWithDocPagesStringIfExist)) { return []; // None to generate & publish } diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 13cf0d85d..a9bc8fe75 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -17,6 +17,7 @@ const args = yargs const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); await publishReleaseNotesAsync(allUpdatedPackages, isDryRun); + process.exit(0); })().catch(err => { utils.log(err); process.exit(1); diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index 87c4ad1d7..be39b1878 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -85,11 +85,13 @@ function logIfDefined(x: any): void { logIfDefined(packageError.error.stdout); logIfDefined(packageError.error.stack); }); + process.exit(1); + } else { process.exit(0); } })().catch(err => { utils.log(`Unexpected error: ${err.message}`); - process.exit(0); + process.exit(1); }); async function testInstallPackageAsync( @@ -144,7 +146,7 @@ async function testInstallPackageAsync( const transpiledIndexFilePath = path.join(testDirectory, 'index.js'); utils.log(`Running test script with ${packageName} imported`); await execAsync(`node ${transpiledIndexFilePath}`); - utils.log(`Successfilly ran test script with ${packageName} imported`); + utils.log(`Successfully ran test script with ${packageName} imported`); } await rimrafAsync(testDirectory); } diff --git a/packages/monorepo-scripts/src/utils/changelog_utils.ts b/packages/monorepo-scripts/src/utils/changelog_utils.ts index 4781b3b7d..8058d222b 100644 --- a/packages/monorepo-scripts/src/utils/changelog_utils.ts +++ b/packages/monorepo-scripts/src/utils/changelog_utils.ts @@ -19,11 +19,6 @@ CHANGELOG export const changelogUtils = { getChangelogMdTitle(versionChangelog: VersionChangelog): string { - if (_.isUndefined(versionChangelog.timestamp)) { - throw new Error( - 'All CHANGELOG.json entries must be updated to include a timestamp before generating their MD version', - ); - } const date = moment(`${versionChangelog.timestamp}`, 'X').format('MMMM D, YYYY'); const title = `\n## v${versionChangelog.version} - _${date}_\n\n`; return title; |