From 145806ee34f6f95d188ab41694a202aac3e2b438 Mon Sep 17 00:00:00 2001 From: turtleDeng Date: Wed, 29 Apr 2020 15:54:51 +0800 Subject: [PATCH] Rm plugin schema (#497) --- bin/emqx | 2 +- bin/emqx.cmd | 2 +- post-compile.cmd | 5 +---- post-compile.sh | 4 +--- rebar.config | 4 ++-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/emqx b/bin/emqx index 6aae3ee7..2bb27055 100755 --- a/bin/emqx +++ b/bin/emqx @@ -74,7 +74,7 @@ echoerr() { echo "$@" 1>&2; } # By default, use cuttlefish to generate app.config and vm.args CUTTLEFISH="${USE_CUTTLEFISH:-yes}" -CUTTLEFISH_COMMAND_PREFIX="$ERTS_PATH/escript $RUNNER_ROOT_DIR/bin/cuttlefish -i $REL_DIR/schema/emqx.schema -d $RUNNER_DATA_DIR/configs" +CUTTLEFISH_COMMAND_PREFIX="$ERTS_PATH/escript $RUNNER_ROOT_DIR/bin/cuttlefish -i $REL_DIR/emqx.schema -d $RUNNER_DATA_DIR/configs" SED_REPLACE="sed -i " case $(sed --help 2>&1) in diff --git a/bin/emqx.cmd b/bin/emqx.cmd index ee1aa5cf..781f3257 100644 --- a/bin/emqx.cmd +++ b/bin/emqx.cmd @@ -142,7 +142,7 @@ @for /f %%Z in ('%%mergeconf_cmd%%') do @( set merged_app_conf=%%Z ) -@set gen_config_cmd=%escript% %cuttlefish% -s %rel_dir%\schema\emqx.schema -c %merged_app_conf% -d %data_dir%\configs generate +@set gen_config_cmd=%escript% %cuttlefish% -s %rel_dir%\emqx.schema -c %merged_app_conf% -d %data_dir%\configs generate @for /f "delims=" %%A in ('%%gen_config_cmd%%') do @( set generated_config_args=%%A ) diff --git a/post-compile.cmd b/post-compile.cmd index b0250f83..c8fc66ff 100644 --- a/post-compile.cmd +++ b/post-compile.cmd @@ -37,10 +37,7 @@ popd :schema pushd %1 -for %%f in ("priv\*.schema") do ( - ::echo %%f - copy %%f "%REBAR_BUILD_DIR%\conf\schema\" -) +copy priv\emqx.schema "%REBAR_BUILD_DIR%\conf\schema\" popd :end diff --git a/post-compile.sh b/post-compile.sh index 92f42339..8e1f2bbf 100755 --- a/post-compile.sh +++ b/post-compile.sh @@ -27,7 +27,5 @@ done ## Collect all schema files mkdir -p conf/schema -for schema in lib/*/priv/*.schema; do - cp ${schema} conf/schema/ -done +cp lib/emqx/priv/emqx.schema conf/schema/ diff --git a/rebar.config b/rebar.config index be982535..4b03dff8 100644 --- a/rebar.config +++ b/rebar.config @@ -16,7 +16,6 @@ emqx_auth_jwt, emqx_auth_mysql, emqx_auth_mnesia, - emqx_extension_hook, emqx_web_hook, emqx_recon, emqx_rule_engine, @@ -34,6 +33,7 @@ emqx_statsd, emqx_reloader, emqx_psk_file, + emqx_extension_hook, emqx_plugin_template ]}. @@ -103,7 +103,7 @@ {template, "data/loaded_modules.tmpl", "data/loaded_modules"}, {copy,"{{output_dir}}/../../conf/acl.conf","etc/acl.conf"}, {copy,"bin/nodetool","bin/nodetool"}, - {copy,"{{output_dir}}/../../conf/schema","releases/{{rel_vsn}}/"}, + {copy,"{{output_dir}}/../../conf/schema/emqx.schema","releases/{{rel_vsn}}/"}, {copy,"bin/install_upgrade_escript", "bin/install_upgrade_escript"}, {template,"{{output_dir}}/../../lib/emqx/etc/{{vm_args_file}}","etc/vm.args"}, {copy, "{{output_dir}}/../../lib/emqx/etc/certs","etc/"},