Skip to content

Commit

Permalink
Artificially set a VERSION environment variable during build steps (#…
Browse files Browse the repository at this point in the history
…19518)

Fixes #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.
  • Loading branch information
turt2live authored Oct 27, 2021
1 parent 940aaa0 commit 85b489b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 85b489b

Please sign in to comment.