chore: add emqx-example-en.conf in release
This commit is contained in:
parent
fbfed35371
commit
be7724b4e7
|
@ -6,6 +6,7 @@ deps
|
|||
*.o
|
||||
*.beam
|
||||
*.plt
|
||||
*.example
|
||||
erl_crash.dump
|
||||
ebin
|
||||
!ebin/.placeholder
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
## All configuration details can be found in emqx.conf.example
|
||||
|
||||
node {
|
||||
name: "emqx@127.0.0.1"
|
||||
cookie: emqxsecretcookie
|
||||
data_dir: "{{ platform_data_dir }}"
|
||||
etc_dir: "{{ platform_etc_dir }}"
|
||||
name = "emqx@127.0.0.1"
|
||||
cookie = emqxsecretcookie
|
||||
data_dir = "{{ platform_data_dir }}"
|
||||
etc_dir = "{{ platform_etc_dir }}"
|
||||
}
|
||||
|
||||
log {
|
||||
file_handlers.default {
|
||||
level: warning
|
||||
file: "{{ platform_log_dir }}/emqx.log"
|
||||
level = warning
|
||||
file = "{{ platform_log_dir }}/emqx.log"
|
||||
}
|
||||
}
|
||||
|
||||
cluster {
|
||||
name: emqxcl
|
||||
discovery_strategy: manual
|
||||
name = emqxcl
|
||||
discovery_strategy = manual
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ dump_schema(Dir, SchemaModule, I18nFile) ->
|
|||
fun(Lang) ->
|
||||
gen_config_md(Dir, I18nFile, SchemaModule, Lang),
|
||||
gen_hot_conf_schema_json(Dir, I18nFile, Lang),
|
||||
gen_example_conf(Dir, I18nFile, SchemaModule, Lang)
|
||||
gen_example_conf(filename:dirname(I18nFile), I18nFile, SchemaModule, Lang)
|
||||
end,
|
||||
[en, zh]
|
||||
),
|
||||
|
@ -177,7 +177,7 @@ gen_config_md(Dir, I18nFile, SchemaModule, Lang0) ->
|
|||
|
||||
gen_example_conf(Dir, I18nFile, SchemaModule, Lang0) ->
|
||||
Lang = atom_to_list(Lang0),
|
||||
SchemaMdFile = filename:join([Dir, "emqx-" ++ Lang ++ ".conf.example"]),
|
||||
SchemaMdFile = filename:join([Dir, "emqx.conf." ++ Lang ++ ".example"]),
|
||||
io:format(user, "===< Generating: ~s~n", [SchemaMdFile]),
|
||||
ok = gen_example(SchemaMdFile, SchemaModule, I18nFile, Lang).
|
||||
|
||||
|
@ -204,7 +204,12 @@ gen_doc(File, SchemaModule, I18nFile, Lang) ->
|
|||
file:write_file(File, Doc).
|
||||
|
||||
gen_example(File, SchemaModule, I18nFile, Lang) ->
|
||||
Opts = #{title => <<"Title">>, body => <<"Body">>, desc_file => I18nFile, lang => Lang},
|
||||
Opts = #{
|
||||
title => <<"EMQX Configuration Example">>,
|
||||
body => <<"">>,
|
||||
desc_file => I18nFile,
|
||||
lang => Lang
|
||||
},
|
||||
Example = hocon_schema_example:gen(SchemaModule, Opts),
|
||||
file:write_file(File, Example).
|
||||
|
||||
|
|
13
mix.exs
13
mix.exs
|
@ -329,20 +329,11 @@ defmodule EMQXUmbrella.MixProject do
|
|||
force: overwrite?
|
||||
)
|
||||
|
||||
# copy generated docs
|
||||
Enum.each(
|
||||
[
|
||||
"apps/emqx_dashboard/priv/www/static/emqx-en.conf.example",
|
||||
"apps/emqx_dashboard/priv/www/static/emqx-zh.conf.example"
|
||||
],
|
||||
fn file ->
|
||||
Mix.Generator.copy_file(
|
||||
file,
|
||||
Path.join(etc, Path.basename(file)),
|
||||
"apps/emqx_dashboard/etc/emqx.conf.en.example",
|
||||
Path.join(etc, "emqx-example-en.conf"),
|
||||
force: overwrite?
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
# this is required by the produced escript / nodetool
|
||||
Mix.Generator.copy_file(
|
||||
|
|
|
@ -395,8 +395,7 @@ etc_overlay(ReleaseType, Edition) ->
|
|||
[
|
||||
{mkdir, "etc/"},
|
||||
{copy, "{{base_dir}}/lib/emqx/etc/certs", "etc/"},
|
||||
{copy, "apps/emqx_dashboard/priv/www/static/emqx-en.conf.example", "etc/"},
|
||||
{copy, "apps/emqx_dashboard/priv/www/static/emqx-zh.conf.example", "etc/"}
|
||||
{copy, "apps/emqx_dashboard/etc/emqx.conf.en.example", "etc/emqx-example-en.conf"}
|
||||
] ++
|
||||
lists:map(
|
||||
fun
|
||||
|
|
Loading…
Reference in New Issue