From 472f89bd3d459c8b5c29de8a808381bf19c8c72b Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 2 Jan 2019 14:46:31 -0800 Subject: feat(monorepo-scripts): Alert to discord when new publish happens --- packages/monorepo-scripts/src/prepublish_checks.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/monorepo-scripts/src/prepublish_checks.ts') 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 { ); } + // 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`); -- cgit v1.2.3