build: fix docdir

This commit is contained in:
Ivan Dyachkov 2023-04-25 18:02:10 +02:00
parent 54c1a2b06d
commit a79c741ee5
1 changed files with 13 additions and 3 deletions

View File

@ -509,7 +509,7 @@ etc_overlay(ReleaseType, Edition) ->
[
{mkdir, "etc/"},
{copy, "{{base_dir}}/lib/emqx/etc/certs", "etc/"},
{copy, "_build/docgen/" ++ name(Edition) ++ "/emqx.conf.example", "etc/emqx.conf.example"}
{copy, "_build/docgen/" ++ profile() ++ "/emqx.conf.example", "etc/emqx.conf.example"}
] ++
lists:map(
fun
@ -646,5 +646,15 @@ list_dir(Dir) ->
[]
end.
name(ce) -> "emqx";
name(ee) -> "emqx-enterprise".
profile() ->
case os:getenv("PROFILE") of
Profile = "emqx-enterprise" ++ _ ->
Profile;
Profile = "emqx" ++ _ ->
Profile;
false ->
"emqx-enterprise";
Profile ->
io:format(standard_error, "ERROR: bad_PROFILE ~p~n", [Profile]),
exit(bad_PROFILE)
end.