aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-11-22 05:19:31 +0800
committerFabio Berger <me@fabioberger.com>2018-11-22 05:19:31 +0800
commit83a043e6397421db0d1d5b8059341b84eeb1e1a7 (patch)
treeb7685c0285283ebce73786a2e8b0ff0996eeb243 /packages/monorepo-scripts
parent8175192f60e2c2827f6e7d664fbe8bf2d9ddee9c (diff)
parentf46a49fd13c88dd86c9661d76bace18844642c04 (diff)
downloaddexon-sol-tools-master.tar
dexon-sol-tools-master.tar.gz
dexon-sol-tools-master.tar.bz2
dexon-sol-tools-master.tar.lz
dexon-sol-tools-master.tar.xz
dexon-sol-tools-master.tar.zst
dexon-sol-tools-master.zip
Merge branch 'development'master
* development: (81 commits) Publish Updated CHANGELOGS print out error message and stack immediately return the patch incremented version if no changelog entries exist Put python package above TS/JS packages Reduce title size reduce text side in README Improve top-level README Fix prettier remove unused flag Add CHANGELOG entry Fix additional comments Improve comments Add migrations, contract-addresses and contract-artifacts to Developers home Create migrations doc reference page Add additional CHANGELOG to types package Add CHANGELOG entry Fix prettier Fix `SimpleContractArtifact` type Update abi-gen-wrappers ...
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/package.json2
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts13
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts1
3 files changed, 14 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index a31085014..9af18a6b7 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0x/monorepo-scripts",
- "version": "1.0.13",
+ "version": "1.0.14",
"engines": {
"node": ">=6.12"
},
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index 5f603ebc7..60cdccf1d 100644
--- a/packages/monorepo-scripts/src/prepublish_checks.ts
+++ b/packages/monorepo-scripts/src/prepublish_checks.ts
@@ -17,6 +17,7 @@ async function prepublishChecksAsync(): Promise<void> {
await checkChangelogFormatAsync(updatedPublicPackages);
await checkGitTagsForNextVersionAndDeleteIfExistAsync(updatedPublicPackages);
await checkPublishRequiredSetupAsync();
+ checkRequiredEnvVariables();
}
async function checkGitTagsForNextVersionAndDeleteIfExistAsync(updatedPublicPackages: Package[]): Promise<void> {
@@ -183,7 +184,17 @@ async function checkPublishRequiredSetupAsync(): Promise<void> {
}
}
+const checkRequiredEnvVariables = () => {
+ utils.log('Checking required environment variables...');
+ const requiredEnvVars = ['INSTANT_HEAP_ANALYTICS_ID_PRODUCTION'];
+ requiredEnvVars.forEach(requiredEnvVarName => {
+ if (_.isUndefined(process.env[requiredEnvVarName])) {
+ throw new Error(`Must have ${requiredEnvVarName} set`);
+ }
+ });
+};
+
prepublishChecksAsync().catch(err => {
- utils.log(err.message);
+ utils.log(err);
process.exit(1);
});
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 44ff971e8..95b187cc2 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -91,6 +91,7 @@ export const utils = {
const changelog = changelogUtils.getChangelogOrCreateIfMissing(packageName, packageLocation);
if (_.isEmpty(changelog)) {
nextVersionIfValid = semver.inc(currentVersion, 'patch');
+ return nextVersionIfValid as string;
}
const lastEntry = changelog[0];
if (semver.gt(currentVersion, lastEntry.version)) {