aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/package.json2
-rw-r--r--packages/monorepo-scripts/src/publish.ts22
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts2
3 files changed, 16 insertions, 10 deletions
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index 128bdcff5..c849c01ba 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -39,7 +39,7 @@
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.11.0",
- "typescript": "2.7.1"
+ "typescript": "2.9.2"
},
"dependencies": {
"@lerna/batch-packages": "^3.0.0-beta.18",
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;