aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-09 06:12:10 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-09 06:12:10 +0800
commit5e8ad0aef422b526751d1c0924f458cf87ea05f5 (patch)
treeb30046a820741038e3a21ed450ee158a5fe7bf87 /packages/monorepo-scripts
parentd7d51791a6bba5dae274c50257038b2bb8fb626b (diff)
parent19cda0eb036b6876964d8074aea1295142d25027 (diff)
downloaddexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar.gz
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar.bz2
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar.lz
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar.xz
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.tar.zst
dexon-sol-tools-5e8ad0aef422b526751d1c0924f458cf87ea05f5.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package
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;