chore: don't copy i18n.conf
This commit is contained in:
parent
b3ec3c9dfb
commit
92019e4d4c
|
@ -146,7 +146,8 @@ dump_schema(Dir, SchemaModule, I18nFile) ->
|
|||
fun(Lang) ->
|
||||
gen_config_md(Dir, I18nFile, SchemaModule, Lang),
|
||||
gen_api_schema_json(Dir, I18nFile, Lang),
|
||||
gen_example_conf(filename:dirname(I18nFile), I18nFile, SchemaModule, Lang)
|
||||
ExampleDir = filename:join(filename:dirname(filename:dirname(I18nFile)), "etc"),
|
||||
gen_example_conf(ExampleDir, I18nFile, SchemaModule, Lang)
|
||||
end,
|
||||
[en, zh]
|
||||
),
|
||||
|
|
|
@ -19,8 +19,8 @@ doc_gen_test() ->
|
|||
"test",
|
||||
"lib",
|
||||
"emqx_dashboard",
|
||||
"etc",
|
||||
"i18n.conf.all"
|
||||
"priv",
|
||||
"i18n.conf"
|
||||
]),
|
||||
_ = emqx_conf:dump_schema(Dir, emqx_conf_schema, I18nFile),
|
||||
ok
|
||||
|
|
|
@ -55,9 +55,8 @@ set_default_config(DefaultUsername) ->
|
|||
},
|
||||
emqx_config:put([dashboard], Config),
|
||||
I18nFile = filename:join([
|
||||
filename:dirname(code:priv_dir(emqx_dashboard)),
|
||||
"etc",
|
||||
"i18n.conf.all"
|
||||
code:priv_dir(emqx_dashboard),
|
||||
"i18n.conf"
|
||||
]),
|
||||
application:set_env(emqx_dashboard, i18n_file, I18nFile),
|
||||
ok.
|
||||
|
|
2
build
2
build
|
@ -92,7 +92,7 @@ make_docs() {
|
|||
# shellcheck disable=SC2086
|
||||
erl -noshell -pa $libs_dir1 $libs_dir2 $libs_dir3 -eval \
|
||||
"Dir = filename:join([apps, emqx_dashboard, priv, www, static]), \
|
||||
I18nFile = filename:join([apps, emqx_dashboard, etc, 'i18n.conf.all']), \
|
||||
I18nFile = filename:join([apps, emqx_dashboard, priv, 'i18n.conf']), \
|
||||
ok = emqx_conf:dump_schema(Dir, $SCHEMA_MODULE, I18nFile), \
|
||||
halt(0)."
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ VOLUME ["/opt/emqx/log", "/opt/emqx/data"]
|
|||
# - 8883 port for MQTT(SSL)
|
||||
# - 11883 port for internal MQTT/TCP
|
||||
# - 18083 for dashboard
|
||||
# - 4370 default Erlang distrbution port
|
||||
# - 4370 default Erlang distribution port
|
||||
# - 5369 for backplain gen_rpc
|
||||
EXPOSE 1883 8081 8083 8084 8883 11883 18083 4370 5369
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ doc_gen_test() ->
|
|||
"test",
|
||||
"lib",
|
||||
"emqx_dashboard",
|
||||
"etc",
|
||||
"i18n.conf.all"
|
||||
"priv",
|
||||
"i18n.conf"
|
||||
]),
|
||||
_ = emqx_conf:dump_schema(Dir, emqx_enterprise_conf_schema, I18nFile),
|
||||
ok
|
||||
|
|
10
mix.exs
10
mix.exs
|
@ -322,16 +322,6 @@ defmodule EMQXUmbrella.MixProject do
|
|||
Path.join(etc, "certs")
|
||||
)
|
||||
|
||||
# required by emqx_dashboard
|
||||
Mix.Generator.copy_file(
|
||||
"apps/emqx_dashboard/etc/i18n.conf.all",
|
||||
Path.join(
|
||||
release.path,
|
||||
"lib/emqx_dashboard-#{release.applications.emqx_dashboard[:vsn]}/priv/i18n.conf"
|
||||
),
|
||||
force: overwrite?
|
||||
)
|
||||
|
||||
Mix.Generator.copy_file(
|
||||
"apps/emqx_dashboard/etc/emqx.conf.en.example",
|
||||
Path.join(etc, "emqx-example.conf"),
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
%% -*- mode: erlang -*-
|
||||
%% This config file is the very basic config to compile emqx
|
||||
%% This allows emqx to be used as a dependency for other applications
|
||||
%% such as emqx module/plugin develpments and tests.
|
||||
%% such as emqx module/plugin developments and tests.
|
||||
|
||||
%% With the help of EMQ's rebar3 fork, the config is extended
|
||||
%% With the help of EMQX's rebar3 fork, the config is extended
|
||||
%% with rebar.config.erl module. Final result is written to
|
||||
%% rebar.config.rendered if environment DEBUG is set.
|
||||
|
||||
|
|
|
@ -424,16 +424,12 @@ emqx_etc_overlay_common() ->
|
|||
|
||||
emqx_etc_overlay_per_edition(ce) ->
|
||||
[
|
||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
||||
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all",
|
||||
"{{base_dir}}/lib/emqx_dashboard/priv/i18n.conf"}
|
||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"}
|
||||
];
|
||||
emqx_etc_overlay_per_edition(ee) ->
|
||||
[
|
||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx_enterprise.conf.all", "etc/emqx_enterprise.conf"},
|
||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
||||
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all",
|
||||
"{{base_dir}}/lib/emqx_dashboard/priv/i18n.conf"}
|
||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"}
|
||||
].
|
||||
|
||||
get_vsn(Profile) ->
|
||||
|
|
|
@ -8,7 +8,7 @@ main(_) ->
|
|||
Conf = [merge(BaseConf, Cfgs),
|
||||
io_lib:nl()
|
||||
],
|
||||
ok = file:write_file("apps/emqx_dashboard/etc/i18n.conf.all", Conf).
|
||||
ok = file:write_file("apps/emqx_dashboard/priv/i18n.conf", Conf).
|
||||
|
||||
merge(BaseConf, Cfgs) ->
|
||||
lists:foldl(
|
||||
|
|
Loading…
Reference in New Issue