mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
configCore: default to enterprise edition if TEST_ENABLE_ACTIVATION is truthy
This will ensure that the grist-ee image will have a consistent config setting when created from the default value.
This commit is contained in:
parent
f0aacc4d96
commit
d57c3f068d
@ -4,7 +4,8 @@ import {
|
|||||||
fileConfigAccessorFactory,
|
fileConfigAccessorFactory,
|
||||||
IWritableConfigValue
|
IWritableConfigValue
|
||||||
} from "./config";
|
} from "./config";
|
||||||
import { convertToCoreFileContents, IGristCoreConfigFileLatest } from "./configCoreFileFormats";
|
import {convertToCoreFileContents, IGristCoreConfigFileLatest} from "./configCoreFileFormats";
|
||||||
|
import {isAffirmative} from 'app/common/gutil';
|
||||||
|
|
||||||
export type Edition = "core" | "enterprise";
|
export type Edition = "core" | "enterprise";
|
||||||
|
|
||||||
@ -23,6 +24,9 @@ export function loadGristCoreConfigFile(configPath?: string): IGristCoreConfig {
|
|||||||
export function loadGristCoreConfig(fileConfig?: FileConfig<IGristCoreConfigFileLatest>): IGristCoreConfig {
|
export function loadGristCoreConfig(fileConfig?: FileConfig<IGristCoreConfigFileLatest>): IGristCoreConfig {
|
||||||
const fileConfigValue = fileConfigAccessorFactory(fileConfig);
|
const fileConfigValue = fileConfigAccessorFactory(fileConfig);
|
||||||
return {
|
return {
|
||||||
edition: createConfigValue<Edition>("core", fileConfigValue("edition"))
|
edition: createConfigValue<Edition>(
|
||||||
|
isAffirmative(process.env.TEST_ENABLE_ACTIVATION) ? "enterprise" : "core",
|
||||||
|
fileConfigValue("edition")
|
||||||
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user