Artificially set a VERSION environment variable during build steps (#19518)
Fixes https://github.com/vector-im/element-web/issues/19485 The variable should be set when it needs to by CI, but in every other environment it's not important. Simply setting it to *something* makes EnvironmentPlugin happy. We print a warning just in case people expect it to be set, and use a clear value in case the environment variable doesn't get properly set.
This commit is contained in:
parent
940aaa0d1a
commit
85b489b3a7
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ dotenv.config();
|
|||
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
|
||||
if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png';
|
||||
|
||||
if (!process.env.VERSION) {
|
||||
console.warn("Unset VERSION variable - this may affect build output");
|
||||
process.env.VERSION = "!!UNSET!!";
|
||||
}
|
||||
|
||||
const cssThemes = {
|
||||
// CSS themes
|
||||
"theme-legacy-light": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss",
|
||||
|
|
Loading…
Reference in a new issue