aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-20 07:38:09 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-20 07:38:09 +0800
commit497385818b42f298c777ce3fbeb3e2d55a2bdc64 (patch)
tree97c32bc1612cc80ea3c960bb86b8d7e01f9678ae /packages/monorepo-scripts/src
parentc30ae762bf62faebfea58eb0874366a851b19d91 (diff)
downloaddexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar.gz
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar.bz2
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar.lz
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar.xz
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.tar.zst
dexon-sol-tools-497385818b42f298c777ce3fbeb3e2d55a2bdc64.zip
Check for instant heap production credentials in pre-publish step
Diffstat (limited to 'packages/monorepo-scripts/src')
-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);