mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Restore version
missing from certain build steps (#14344)
Certain build steps accidentally omitted the `version` variable. It has now been restored to all steps, ensuring that all environment variables are correctly injected into all bundles. A check has been added to the Sentry setup module to ensure the release is not omitted in the future.
This commit is contained in:
parent
0556feb142
commit
2d08fe35e5
@ -68,9 +68,9 @@ export const SENTRY_STATE = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function setupSentry({ release, getState }) {
|
export default function setupSentry({ release, getState }) {
|
||||||
let sentryTarget;
|
if (!release) {
|
||||||
|
throw new Error('Missing release');
|
||||||
if (METAMASK_DEBUG) {
|
} else if (METAMASK_DEBUG) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +79,7 @@ export default function setupSentry({ release, getState }) {
|
|||||||
? METAMASK_ENVIRONMENT
|
? METAMASK_ENVIRONMENT
|
||||||
: `${METAMASK_ENVIRONMENT}-${METAMASK_BUILD_TYPE}`;
|
: `${METAMASK_ENVIRONMENT}-${METAMASK_BUILD_TYPE}`;
|
||||||
|
|
||||||
|
let sentryTarget;
|
||||||
if (METAMASK_ENVIRONMENT === 'production') {
|
if (METAMASK_ENVIRONMENT === 'production') {
|
||||||
if (!process.env.SENTRY_DSN) {
|
if (!process.env.SENTRY_DSN) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
@ -269,6 +269,7 @@ function createScriptTasks({
|
|||||||
testing,
|
testing,
|
||||||
policyOnly,
|
policyOnly,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
|
version,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,6 +286,7 @@ function createScriptTasks({
|
|||||||
testing,
|
testing,
|
||||||
policyOnly,
|
policyOnly,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
|
version,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +303,7 @@ function createScriptTasks({
|
|||||||
testing,
|
testing,
|
||||||
policyOnly,
|
policyOnly,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
|
version,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,6 +323,7 @@ function createScriptTasks({
|
|||||||
policyOnly,
|
policyOnly,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
testing,
|
testing,
|
||||||
|
version,
|
||||||
}),
|
}),
|
||||||
createNormalBundle({
|
createNormalBundle({
|
||||||
buildType,
|
buildType,
|
||||||
@ -332,6 +336,7 @@ function createScriptTasks({
|
|||||||
policyOnly,
|
policyOnly,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
testing,
|
testing,
|
||||||
|
version,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -532,6 +537,7 @@ function createNormalBundle({
|
|||||||
modulesToExpose,
|
modulesToExpose,
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
testing,
|
testing,
|
||||||
|
version,
|
||||||
}) {
|
}) {
|
||||||
return async function () {
|
return async function () {
|
||||||
// create bundler setup and apply defaults
|
// create bundler setup and apply defaults
|
||||||
@ -543,7 +549,12 @@ function createNormalBundle({
|
|||||||
const reloadOnChange = Boolean(devMode);
|
const reloadOnChange = Boolean(devMode);
|
||||||
const minify = Boolean(devMode) === false;
|
const minify = Boolean(devMode) === false;
|
||||||
|
|
||||||
const envVars = getEnvironmentVariables({ buildType, devMode, testing });
|
const envVars = getEnvironmentVariables({
|
||||||
|
buildType,
|
||||||
|
devMode,
|
||||||
|
testing,
|
||||||
|
version,
|
||||||
|
});
|
||||||
setupBundlerDefaults(buildConfiguration, {
|
setupBundlerDefaults(buildConfiguration, {
|
||||||
buildType,
|
buildType,
|
||||||
devMode,
|
devMode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user