diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 05:26:00 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 05:26:00 +0800 |
commit | eca63b1a5815c61901453837f9c2b737fa82eb20 (patch) | |
tree | 7763d95f1922f6c16848a8b506384e6e9992260b /packages/monorepo-scripts/src | |
parent | 2bda6dd719d748a4bfa5ff8e23e97924e0258af1 (diff) | |
parent | ba41fc9275bebe17577f87d72f54b7e7dc420acc (diff) | |
download | dexon-0x-contracts-eca63b1a5815c61901453837f9c2b737fa82eb20.tar.gz dexon-0x-contracts-eca63b1a5815c61901453837f9c2b737fa82eb20.tar.zst dexon-0x-contracts-eca63b1a5815c61901453837f9c2b737fa82eb20.zip |
Merge branch 'development' into feature/header-tweaks
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r-- | packages/monorepo-scripts/src/prepublish_checks.ts | 11 |
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); |