1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Fix environment variables used during test builds (#12855)

The environment variables used for test builds was wrong for certain
bundles because the `testing` flag wasn't passed through to the
function that determines which environment variables to inject.
Effectively this means that test builds on `master` were going to the
production `metamask` Sentry project rather than the `test-metamask`
project. This has been the case since #11080.

The `testing` flag is now included for all bundles, and test builds now
use the `test-metamask` Sentry project in all cases.
This commit is contained in:
Mark Stacey 2021-11-26 15:39:32 -03:30 committed by Dan Miller
parent 9fd42f1bc2
commit 19a8b58aa1

View File

@ -206,18 +206,18 @@ function createScriptTasks({
// this can run whenever // this can run whenever
const disableConsoleSubtask = createTask( const disableConsoleSubtask = createTask(
`${taskPrefix}:disable-console`, `${taskPrefix}:disable-console`,
createTaskForBundleDisableConsole({ devMode }), createTaskForBundleDisableConsole({ devMode, testing }),
); );
// this can run whenever // this can run whenever
const installSentrySubtask = createTask( const installSentrySubtask = createTask(
`${taskPrefix}:sentry`, `${taskPrefix}:sentry`,
createTaskForBundleSentry({ devMode }), createTaskForBundleSentry({ devMode, testing }),
); );
const phishingDetectSubtask = createTask( const phishingDetectSubtask = createTask(
`${taskPrefix}:phishing-detect`, `${taskPrefix}:phishing-detect`,
createTaskForBundlePhishingDetect({ devMode }), createTaskForBundlePhishingDetect({ devMode, testing }),
); );
// task for initiating browser livereload // task for initiating browser livereload
@ -255,7 +255,7 @@ function createScriptTasks({
return composeParallel(initiateLiveReload, ...allSubtasks); return composeParallel(initiateLiveReload, ...allSubtasks);
} }
function createTaskForBundleDisableConsole({ devMode }) { function createTaskForBundleDisableConsole({ devMode, testing }) {
const label = 'disable-console'; const label = 'disable-console';
return createNormalBundle({ return createNormalBundle({
browserPlatforms, browserPlatforms,
@ -271,7 +271,7 @@ function createScriptTasks({
}); });
} }
function createTaskForBundleSentry({ devMode }) { function createTaskForBundleSentry({ devMode, testing }) {
const label = 'sentry-install'; const label = 'sentry-install';
return createNormalBundle({ return createNormalBundle({
browserPlatforms, browserPlatforms,
@ -287,7 +287,7 @@ function createScriptTasks({
}); });
} }
function createTaskForBundlePhishingDetect({ devMode }) { function createTaskForBundlePhishingDetect({ devMode, testing }) {
const label = 'phishing-detect'; const label = 'phishing-detect';
return createNormalBundle({ return createNormalBundle({
buildType, buildType,