From 19a8b58aa1eb28046dab7422335f259a89aa61be Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 26 Nov 2021 15:39:32 -0330 Subject: [PATCH] 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. --- development/build/scripts.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/development/build/scripts.js b/development/build/scripts.js index f106dbca5..cf49dd302 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -206,18 +206,18 @@ function createScriptTasks({ // this can run whenever const disableConsoleSubtask = createTask( `${taskPrefix}:disable-console`, - createTaskForBundleDisableConsole({ devMode }), + createTaskForBundleDisableConsole({ devMode, testing }), ); // this can run whenever const installSentrySubtask = createTask( `${taskPrefix}:sentry`, - createTaskForBundleSentry({ devMode }), + createTaskForBundleSentry({ devMode, testing }), ); const phishingDetectSubtask = createTask( `${taskPrefix}:phishing-detect`, - createTaskForBundlePhishingDetect({ devMode }), + createTaskForBundlePhishingDetect({ devMode, testing }), ); // task for initiating browser livereload @@ -255,7 +255,7 @@ function createScriptTasks({ return composeParallel(initiateLiveReload, ...allSubtasks); } - function createTaskForBundleDisableConsole({ devMode }) { + function createTaskForBundleDisableConsole({ devMode, testing }) { const label = 'disable-console'; return createNormalBundle({ browserPlatforms, @@ -271,7 +271,7 @@ function createScriptTasks({ }); } - function createTaskForBundleSentry({ devMode }) { + function createTaskForBundleSentry({ devMode, testing }) { const label = 'sentry-install'; return createNormalBundle({ browserPlatforms, @@ -287,7 +287,7 @@ function createScriptTasks({ }); } - function createTaskForBundlePhishingDetect({ devMode }) { + function createTaskForBundlePhishingDetect({ devMode, testing }) { const label = 'phishing-detect'; return createNormalBundle({ buildType,