aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/publish.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-14 04:01:32 +0800
committerFabio Berger <me@fabioberger.com>2018-08-14 04:01:32 +0800
commit9d3c287918389d07f884245bd1bc968955768b6f (patch)
tree460fded537c7d64154972b7d14332f88554d14c0 /packages/monorepo-scripts/src/publish.ts
parentc2b5fe3d844d35966c5498326000bd8317fb547c (diff)
parent15e15f994a1b18cf2e9be151194c826d53a01601 (diff)
downloaddexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar.gz
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar.bz2
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar.lz
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar.xz
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.tar.zst
dexon-sol-tools-9d3c287918389d07f884245bd1bc968955768b6f.zip
Merge branch 'sol-cov-fixes' of github.com:0xProject/0x-monorepo into sol-cov-fixes
* 'sol-cov-fixes' of github.com:0xProject/0x-monorepo: (49 commits) Add @return comments Import marshaller directly Update comment about ethers checksummed address behavior Add packages/coverage/.gitkeep file Update CI config and package.json to run @0xproject/utils tests on CI Update remaining CHANGELOG.json files Change amir picture Update CHANGELOG.json for contract-wrappers Update ethers typings for TypeScript 2.9.2 Update CHANGELOG.json for base-contract Move some ethers-related types to typescript-typings/ethers Apply prettier Add strictArgumentEncodingCheck to BaseContract and use it in contract templates fix(monorepo-scripts): Fix typo in git tag command feat(monorepo-scripts): Add confirmation prompt before publishing fix comments and styling for MixinSignatureValidator Update TypeScript to version 2.9.2 Use asm for hashEIP712Message, increment free memory pointer after asm hashing functions Fix comments, styling, and optimize hashOrder Remove assertion comments ...
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 5992131db..6ff0c9bef 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -31,12 +31,25 @@ const packageNameToWebsitePath: { [name: string]: string } = {
'ethereum-types': 'ethereum-types',
};
+async function confirmAsync(message: string): Promise<void> {
+ prompt.start();
+ const result = await promisify(prompt.get)([message]);
+ const didConfirm = result[message] === 'y';
+ if (!didConfirm) {
+ utils.log('Publish process aborted.');
+ process.exit(0);
+ }
+}
+
(async () => {
// Fetch public, updated Lerna packages
const shouldIncludePrivate = true;
const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate);
if (!configs.IS_LOCAL_PUBLISH) {
+ await confirmAsync(
+ 'THIS IS NOT A TEST PUBLISH! You are about to publish one or more packages to npm. Are you sure you want to continue? (y/n)',
+ );
await confirmDocPagesRenderAsync(allUpdatedPackages);
}
@@ -107,14 +120,7 @@ package.ts. Please add an entry for it and try again.`,
opn(link);
});
- prompt.start();
- const message = 'Do all the doc pages render properly? (yn)';
- const result = await promisify(prompt.get)([message]);
- const didConfirm = result[message] === 'y';
- if (!didConfirm) {
- utils.log('Publish process aborted.');
- process.exit(0);
- }
+ await confirmAsync('Do all the doc pages render properly? (y/n)');
}
async function pushChangelogsToGithubAsync(): Promise<void> {