aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/publish.ts11
-rw-r--r--packages/monorepo-scripts/src/publish_release_notes.ts1
-rw-r--r--packages/monorepo-scripts/src/test_installation.ts6
-rw-r--r--packages/monorepo-scripts/src/utils/changelog_utils.ts5
4 files changed, 11 insertions, 12 deletions
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;