diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js index 052be66ce..7332041bb 100644 --- a/app/scripts/lib/setupSentry.js +++ b/app/scripts/lib/setupSentry.js @@ -68,9 +68,9 @@ export const SENTRY_STATE = { }; export default function setupSentry({ release, getState }) { - let sentryTarget; - - if (METAMASK_DEBUG) { + if (!release) { + throw new Error('Missing release'); + } else if (METAMASK_DEBUG) { return undefined; } @@ -79,6 +79,7 @@ export default function setupSentry({ release, getState }) { ? METAMASK_ENVIRONMENT : `${METAMASK_ENVIRONMENT}-${METAMASK_BUILD_TYPE}`; + let sentryTarget; if (METAMASK_ENVIRONMENT === 'production') { if (!process.env.SENTRY_DSN) { throw new Error( diff --git a/development/build/scripts.js b/development/build/scripts.js index 063fc5a7e..41a9cb6ca 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -269,6 +269,7 @@ function createScriptTasks({ testing, policyOnly, shouldLintFenceFiles, + version, }); } @@ -285,6 +286,7 @@ function createScriptTasks({ testing, policyOnly, shouldLintFenceFiles, + version, }); } @@ -301,6 +303,7 @@ function createScriptTasks({ testing, policyOnly, shouldLintFenceFiles, + version, }); } @@ -320,6 +323,7 @@ function createScriptTasks({ policyOnly, shouldLintFenceFiles, testing, + version, }), createNormalBundle({ buildType, @@ -332,6 +336,7 @@ function createScriptTasks({ policyOnly, shouldLintFenceFiles, testing, + version, }), ); } @@ -532,6 +537,7 @@ function createNormalBundle({ modulesToExpose, shouldLintFenceFiles, testing, + version, }) { return async function () { // create bundler setup and apply defaults @@ -543,7 +549,12 @@ function createNormalBundle({ const reloadOnChange = Boolean(devMode); const minify = Boolean(devMode) === false; - const envVars = getEnvironmentVariables({ buildType, devMode, testing }); + const envVars = getEnvironmentVariables({ + buildType, + devMode, + testing, + version, + }); setupBundlerDefaults(buildConfiguration, { buildType, devMode,