aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/prepublish_checks.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-03 06:46:31 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-03 06:46:31 +0800
commit472f89bd3d459c8b5c29de8a808381bf19c8c72b (patch)
tree7de44fb721961667688b9025b4516228b567d029 /packages/monorepo-scripts/src/prepublish_checks.ts
parent9b540fd8e52e7578d3749e6d9ef9cd97d602ffb3 (diff)
downloaddexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar.gz
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar.bz2
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar.lz
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar.xz
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.tar.zst
dexon-0x-contracts-472f89bd3d459c8b5c29de8a808381bf19c8c72b.zip
feat(monorepo-scripts): Alert to discord when new publish happens
Diffstat (limited to 'packages/monorepo-scripts/src/prepublish_checks.ts')
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index 36e61714b..82eaf5cf9 100644
--- a/packages/monorepo-scripts/src/prepublish_checks.ts
+++ b/packages/monorepo-scripts/src/prepublish_checks.ts
@@ -140,6 +140,13 @@ async function checkPublishRequiredSetupAsync(): Promise<void> {
);
}
+ // Check to see if discord URL is set up
+ if (_.isUndefined(constants.discordAlertWebhookUrl)) {
+ throw new Error(
+ 'You must have a discord webhook URL set to an envVar named `DISCORD_GITHUB_RELEASE_WEBHOOK_URL`. Add it then try again.',
+ );
+ }
+
// Check Yarn version is 1.X
utils.log('Checking the yarn version...');
const result = await execAsync(`yarn --version`);