aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-11-21 15:19:29 +0800
committerAugust Skare <post@augustskare.no>2018-11-21 15:19:29 +0800
commit592e1a3e6ff974d357aff02f1c170d6624895b7e (patch)
tree8b8c519206b8921356b4491ca3fa6bf9d82d222d /packages/monorepo-scripts
parent99176c2d5482b6eb2d2e223ac6cbdae5fc3e42ce (diff)
parent15f05733be45e05974972c80c4fa8437a62633e2 (diff)
downloaddexon-sol-tools-592e1a3e6ff974d357aff02f1c170d6624895b7e.tar.gz
dexon-sol-tools-592e1a3e6ff974d357aff02f1c170d6624895b7e.tar.zst
dexon-sol-tools-592e1a3e6ff974d357aff02f1c170d6624895b7e.zip
Merge branch 'development' into dev-tools-pages
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index 5f603ebc7..fc550cf3a 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,6 +184,16 @@ 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);
process.exit(1);