Merge pull request #1028 from 0xProject/fix-ci
Fix `test_publish` CI Test
This commit is contained in:
commit
368dbda8f0
@ -1,7 +1,14 @@
|
|||||||
import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils';
|
import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils';
|
||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||||
import { ContractArtifact } from 'ethereum-types';
|
import {
|
||||||
import { BlockParamLiteral, ContractAbi, FilterObject, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types';
|
BlockParamLiteral,
|
||||||
|
ContractAbi,
|
||||||
|
ContractArtifact,
|
||||||
|
FilterObject,
|
||||||
|
LogEntry,
|
||||||
|
LogWithDecodedArgs,
|
||||||
|
RawLog,
|
||||||
|
} from 'ethereum-types';
|
||||||
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
|
@ -74,9 +74,11 @@ async function confirmAsync(message: string): Promise<void> {
|
|||||||
});
|
});
|
||||||
utils.log(`Calling 'lerna publish'...`);
|
utils.log(`Calling 'lerna publish'...`);
|
||||||
await lernaPublishAsync(packageToNextVersion);
|
await lernaPublishAsync(packageToNextVersion);
|
||||||
|
if (!configs.IS_LOCAL_PUBLISH) {
|
||||||
const isStaging = false;
|
const isStaging = false;
|
||||||
const shouldUploadDocs = !configs.IS_LOCAL_PUBLISH;
|
const shouldUploadDocs = true;
|
||||||
await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs);
|
await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs);
|
||||||
|
}
|
||||||
const isDryRun = configs.IS_LOCAL_PUBLISH;
|
const isDryRun = configs.IS_LOCAL_PUBLISH;
|
||||||
await publishReleaseNotesAsync(updatedPublicPackages, isDryRun);
|
await publishReleaseNotesAsync(updatedPublicPackages, isDryRun);
|
||||||
})().catch(err => {
|
})().catch(err => {
|
||||||
|
@ -146,7 +146,7 @@ async function testInstallPackageAsync(
|
|||||||
const transpiledIndexFilePath = path.join(testDirectory, 'index.js');
|
const transpiledIndexFilePath = path.join(testDirectory, 'index.js');
|
||||||
utils.log(`Running test script with ${packageName} imported`);
|
utils.log(`Running test script with ${packageName} imported`);
|
||||||
await execAsync(`node ${transpiledIndexFilePath}`);
|
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);
|
await rimrafAsync(testDirectory);
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,6 @@ CHANGELOG
|
|||||||
|
|
||||||
export const changelogUtils = {
|
export const changelogUtils = {
|
||||||
getChangelogMdTitle(versionChangelog: VersionChangelog): string {
|
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 date = moment(`${versionChangelog.timestamp}`, 'X').format('MMMM D, YYYY');
|
||||||
const title = `\n## v${versionChangelog.version} - _${date}_\n\n`;
|
const title = `\n## v${versionChangelog.version} - _${date}_\n\n`;
|
||||||
return title;
|
return title;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { readFileSync } from 'fs';
|
import { readFileSync } from 'fs';
|
||||||
|
|
||||||
export const md = {
|
export const md = {
|
||||||
introduction: readFileSync('lib/md/introduction.md').toString(),
|
introduction: readFileSync(`${__dirname}/introduction.md`).toString(),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user