aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-08-09 23:03:41 +0800
committerGitHub <noreply@github.com>2018-08-09 23:03:41 +0800
commit15e15f994a1b18cf2e9be151194c826d53a01601 (patch)
tree57b6db2615875c00cb16b1c94c7be113c2a18618 /packages/monorepo-scripts/src
parentd44ff6a91582ed2b4dc25059d52556c4f9c6e163 (diff)
parent53713188fee57391040c24cc627fdc5ab8982d2e (diff)
downloaddexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.gz
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.bz2
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.lz
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.xz
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.zst
dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.zip
Merge branch 'development' into sol-cov-fixes
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/publish.ts22
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts2
2 files changed, 15 insertions, 9 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> {
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index d9bae3ea9..26ac801bd 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -117,7 +117,7 @@ export const utils = {
return tags;
},
async getLocalGitTagsAsync(): Promise<string[]> {
- const result = await execAsync(`git tags`, {
+ const result = await execAsync(`git tag`, {
cwd: constants.monorepoRootPath,
});
const tagsString = result.stdout;