refactor: generate document related artifacts to _build/docgen
This commit is contained in:
parent
37c17b120f
commit
3463cd0d37
|
@ -146,8 +146,7 @@ dump_schema(Dir, SchemaModule, I18nFile) ->
|
|||
fun(Lang) ->
|
||||
gen_config_md(Dir, I18nFile, SchemaModule, Lang),
|
||||
gen_api_schema_json(Dir, I18nFile, Lang),
|
||||
ExampleDir = filename:join(filename:dirname(filename:dirname(I18nFile)), "etc"),
|
||||
gen_example_conf(ExampleDir, I18nFile, SchemaModule, Lang)
|
||||
gen_example_conf(Dir, I18nFile, SchemaModule, Lang)
|
||||
end,
|
||||
[en, zh]
|
||||
),
|
||||
|
|
3
build
3
build
|
@ -112,9 +112,10 @@ make_docs() {
|
|||
SCHEMA_MODULE='emqx_conf_schema'
|
||||
;;
|
||||
esac
|
||||
mkdir -p _build/docgen
|
||||
# shellcheck disable=SC2086
|
||||
erl -noshell -pa $libs_dir1 $libs_dir2 $libs_dir3 -eval \
|
||||
"Dir = filename:join([apps, emqx_dashboard, priv, www, static]), \
|
||||
"Dir = filename:join(['_build', docgen]), \
|
||||
I18nFile = filename:join([apps, emqx_dashboard, priv, 'i18n.conf']), \
|
||||
ok = emqx_conf:dump_schema(Dir, $SCHEMA_MODULE, I18nFile), \
|
||||
halt(0)."
|
||||
|
|
|
@ -462,7 +462,7 @@ etc_overlay(ReleaseType, Edition) ->
|
|||
[
|
||||
{mkdir, "etc/"},
|
||||
{copy, "{{base_dir}}/lib/emqx/etc/certs", "etc/"},
|
||||
{copy, "apps/emqx_dashboard/etc/emqx.conf.en.example", "etc/emqx-example.conf"}
|
||||
{copy, "_build/docgen/emqx.conf.en.example", "etc/emqx.conf.example"}
|
||||
] ++
|
||||
lists:map(
|
||||
fun
|
||||
|
|
Loading…
Reference in New Issue