Adding env variable that allows to display any version name in the dashboard settings (#3533)

* Add env var that overrides version

* Trigger CI
This commit is contained in:
Patryk Andrzejewski 2023-04-26 12:05:16 +02:00 committed by GitHub
parent 0cf9c1721e
commit 2c200af0dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -21,7 +21,7 @@ const VersionInfo: React.FC<VersionInfoProps> = ({
<Typography variant="caption" className={classes.container}>
<div
className={classes.versionItem}
>{`dashboard v${dashboardVersion}`}</div>
>{`dashboard ${dashboardVersion}`}</div>
<div className={classes.versionItem}>{`core v${coreVersion}`}</div>
</Typography>
);

View file

@ -125,7 +125,8 @@ export const defaultListSettings: AppListViewSettings = {
},
};
export const APP_VERSION = packageInfo.version;
export const APP_VERSION =
process.env.CUSTOM_VERSION || `v${packageInfo.version}`;
export const DEMO_MODE = process.env.DEMO_MODE === "true";
export const GTM_ID = process.env.GTM_ID;

View file

@ -39,6 +39,7 @@ export default defineConfig(({ command, mode }) => {
APPS_TUNNEL_URL_KEYWORDS,
SKIP_SOURCEMAPS,
DEMO_MODE,
CUSTOM_VERSION,
FLAGS_SERVICE_ENABLED,
FLAGSMITH_ID,
} = env;
@ -157,6 +158,7 @@ export default defineConfig(({ command, mode }) => {
SENTRY_DSN,
ENVIRONMENT,
DEMO_MODE,
CUSTOM_VERSION,
},
},
build: {