chore: change to BACKSTAGE_ENV
as per review Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -90,7 +90,7 @@ describe('ConfigSources', () => {
|
||||
{ name: 'FileConfigSource', path: `${root}app-config.local.yaml` },
|
||||
]);
|
||||
|
||||
process.env = Object.assign(process.env, { BACKSTAGE_ENVIRONMENT: 'test' });
|
||||
process.env = Object.assign(process.env, { BACKSTAGE_ENV: 'test' });
|
||||
expect(
|
||||
mergeSources(
|
||||
ConfigSources.defaultForTargets({ rootDir: '/', targets: [] }),
|
||||
|
||||
@@ -184,11 +184,11 @@ export class ConfigSources {
|
||||
const localPath = resolvePath(rootDir, 'app-config.local.yaml');
|
||||
const envPath = resolvePath(
|
||||
rootDir,
|
||||
`app-config.${process.env.BACKSTAGE_ENVIRONMENT}.yaml`,
|
||||
`app-config.${process.env.BACKSTAGE_ENV}.yaml`,
|
||||
);
|
||||
const envLocalPath = resolvePath(
|
||||
rootDir,
|
||||
`app-config.${process.env.BACKSTAGE_ENVIRONMENT}.local.yaml`,
|
||||
`app-config.${process.env.BACKSTAGE_ENV}.local.yaml`,
|
||||
);
|
||||
const alwaysIncludeDefaultConfigSource =
|
||||
!options.allowMissingDefaultConfig;
|
||||
@@ -203,7 +203,7 @@ export class ConfigSources {
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.BACKSTAGE_ENVIRONMENT && fs.pathExistsSync(envPath)) {
|
||||
if (process.env.BACKSTAGE_ENV && fs.pathExistsSync(envPath)) {
|
||||
argSources.push(
|
||||
FileConfigSource.create({
|
||||
watch: options.watch,
|
||||
@@ -223,10 +223,7 @@ export class ConfigSources {
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
process.env.BACKSTAGE_ENVIRONMENT &&
|
||||
fs.pathExistsSync(envLocalPath)
|
||||
) {
|
||||
if (process.env.BACKSTAGE_ENV && fs.pathExistsSync(envLocalPath)) {
|
||||
argSources.push(
|
||||
FileConfigSource.create({
|
||||
watch: options.watch,
|
||||
|
||||
Reference in New Issue
Block a user