chore(ds): Support platform profile
This commit is contained in:
parent
6d94809950
commit
4825079964
|
@ -2,6 +2,8 @@
|
||||||
Profile = case os:getenv("PROFILE") of
|
Profile = case os:getenv("PROFILE") of
|
||||||
"emqx-enterprise" ++ _ ->
|
"emqx-enterprise" ++ _ ->
|
||||||
ee;
|
ee;
|
||||||
|
"emqx-platform" ++ _ ->
|
||||||
|
platform;
|
||||||
false ->
|
false ->
|
||||||
io:format(user, "WARN: environment variable PROFILE is not set, using 'emqx-enterprise'~n", []),
|
io:format(user, "WARN: environment variable PROFILE is not set, using 'emqx-enterprise'~n", []),
|
||||||
ee;
|
ee;
|
||||||
|
@ -18,9 +20,15 @@ EEDeps =
|
||||||
[
|
[
|
||||||
{emqx_ds_builtin_raft, {path, "../emqx_ds_builtin_raft"}}
|
{emqx_ds_builtin_raft, {path, "../emqx_ds_builtin_raft"}}
|
||||||
],
|
],
|
||||||
|
PlatformDeps =
|
||||||
|
[
|
||||||
|
{emqx_fdb_ds, {path, "../emqx_fdb_ds"}}
|
||||||
|
],
|
||||||
case Profile of
|
case Profile of
|
||||||
ee ->
|
ee ->
|
||||||
[{deps, CEDeps ++ EEDeps}];
|
[{deps, CEDeps ++ EEDeps}];
|
||||||
|
platform ->
|
||||||
|
[{deps, CEDeps ++ EEDeps ++ PlatformDeps}];
|
||||||
ce ->
|
ce ->
|
||||||
[{deps, CEDeps}]
|
[{deps, CEDeps}]
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
Profile = case os:getenv("PROFILE") of
|
Profile = case os:getenv("PROFILE") of
|
||||||
"emqx-enterprise" ++ _ ->
|
"emqx-enterprise" ++ _ ->
|
||||||
ee;
|
ee;
|
||||||
|
"emqx-platform" ++ _ ->
|
||||||
|
platform;
|
||||||
false ->
|
false ->
|
||||||
io:format(user, "WARN: environment variable PROFILE is not set, using 'emqx-enterprise'~n", []),
|
io:format(user, "WARN: environment variable PROFILE is not set, using 'emqx-enterprise'~n", []),
|
||||||
ee;
|
ee;
|
||||||
|
@ -9,18 +11,23 @@ Profile = case os:getenv("PROFILE") of
|
||||||
ce
|
ce
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
Backends = case Profile of
|
||||||
|
ce ->
|
||||||
|
[emqx_ds_builtin_local];
|
||||||
|
ee ->
|
||||||
|
[emqx_ds_builtin_local, emqx_ds_builtin_raft];
|
||||||
|
platform ->
|
||||||
|
[emqx_ds_builtin_local, emqx_ds_builtin_raft, emqx_fdb_ds]
|
||||||
|
end,
|
||||||
|
|
||||||
|
io:format(user, "DS backends available for this release (~p): ~p~n", [Profile, Backends]),
|
||||||
|
|
||||||
{application, emqx_ds_backends, [
|
{application, emqx_ds_backends, [
|
||||||
{description, "A placeholder application that depends on all available DS backends"},
|
{description, "A placeholder application that depends on all available DS backends"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib, emqx_durable_storage, emqx_ds_builtin_local |
|
{applications, [kernel, stdlib, emqx_durable_storage | Backends]},
|
||||||
case Profile of
|
|
||||||
ee ->
|
|
||||||
[emqx_ds_builtin_raft];
|
|
||||||
ce ->
|
|
||||||
[]
|
|
||||||
end]},
|
|
||||||
{env, []}
|
{env, []}
|
||||||
]}.
|
]}.
|
||||||
|
|
Loading…
Reference in New Issue