Merge pull request #4173 from zmstone/refactor-relocate-management-and-dashboard
refactor(proj): Move opensource apps to lib-opensource
This commit is contained in:
commit
12568c8c74
|
@ -41,5 +41,5 @@ tmp/
|
||||||
_packages
|
_packages
|
||||||
elvis
|
elvis
|
||||||
emqx_dialyzer_*_plt
|
emqx_dialyzer_*_plt
|
||||||
apps/emqx_dashboard/priv/www
|
*/emqx_dashboard/priv/www
|
||||||
dist.zip
|
dist.zip
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -2,6 +2,7 @@ REBAR_VERSION = 3.14.3-emqx-4
|
||||||
DASHBOARD_VERSION = v4.3.0
|
DASHBOARD_VERSION = v4.3.0
|
||||||
REBAR = $(CURDIR)/rebar3
|
REBAR = $(CURDIR)/rebar3
|
||||||
BUILD = $(CURDIR)/build
|
BUILD = $(CURDIR)/build
|
||||||
|
export EMQX_ENTERPRISE=false
|
||||||
export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh)
|
export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh)
|
||||||
|
|
||||||
PROFILE ?= emqx
|
PROFILE ?= emqx
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
[
|
[
|
||||||
{config,
|
{config,
|
||||||
[
|
[
|
||||||
#{dirs => ["apps/**/src", "src"],
|
#{dirs => ["src", "apps/**/src", "lib-opensource/**/src"],
|
||||||
filter => "*.erl",
|
filter => "*.erl",
|
||||||
ruleset => erl_files,
|
ruleset => erl_files,
|
||||||
rules => [
|
rules => [
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
]}}
|
]}}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
#{dirs => ["apps/**/test", "test"],
|
#{dirs => ["test", "apps/**/test", "lib-opensource/**/src"],
|
||||||
filter => "*.erl",
|
filter => "*.erl",
|
||||||
rules => [
|
rules => [
|
||||||
{elvis_text_style, line_length, #{ limit => 100
|
{elvis_text_style, line_length, #{ limit => 100
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
#set -euo pipefail
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
|
@ -10,7 +9,11 @@ cd -P -- "$(dirname -- "$0")"
|
||||||
|
|
||||||
DOWNLOAD_URL='https://github.com/emqx/emqx-dashboard-frontend/releases/download'
|
DOWNLOAD_URL='https://github.com/emqx/emqx-dashboard-frontend/releases/download'
|
||||||
|
|
||||||
DASHBOARD_PATH='apps/emqx_dashboard/priv'
|
if [ "$EMQX_ENTERPRISE" = 'true' ] || [ "$EMQX_ENTERPRISE" == '1' ]; then
|
||||||
|
DASHBOARD_PATH='lib-enterprise/emqx_dashboard/priv'
|
||||||
|
else
|
||||||
|
DASHBOARD_PATH='lib-opensource/emqx_dashboard/priv'
|
||||||
|
fi
|
||||||
|
|
||||||
case $(uname) in
|
case $(uname) in
|
||||||
*Darwin*) SED="sed -E";;
|
*Darwin*) SED="sed -E";;
|
||||||
|
|
|
@ -279,7 +279,7 @@ provide_bcrypt_release(ReleaseType) ->
|
||||||
%% rebar3 does not handle umberella project's cross-app parse_transform well
|
%% rebar3 does not handle umberella project's cross-app parse_transform well
|
||||||
compile_and_load_pase_transforms(Dir) ->
|
compile_and_load_pase_transforms(Dir) ->
|
||||||
PtFiles =
|
PtFiles =
|
||||||
[ "apps/emqx_rule_engine/src/emqx_rule_actions_trans.erl"
|
[ "lib-opensource/emqx_rule_engine/src/emqx_rule_actions_trans.erl"
|
||||||
],
|
],
|
||||||
CompileOpts = [verbose,report_errors,report_warnings,return_errors,debug_info],
|
CompileOpts = [verbose,report_errors,report_warnings,return_errors,debug_info],
|
||||||
lists:foreach(fun(PtFile) -> {ok, _Mod} = compile:file(path(Dir, PtFile), CompileOpts) end, PtFiles).
|
lists:foreach(fun(PtFile) -> {ok, _Mod} = compile:file(path(Dir, PtFile), CompileOpts) end, PtFiles).
|
||||||
|
@ -291,8 +291,8 @@ str(B) when is_binary(B) -> unicode:characters_to_list(B, utf8).
|
||||||
|
|
||||||
erl_opts_i() ->
|
erl_opts_i() ->
|
||||||
[{i, "apps"}] ++
|
[{i, "apps"}] ++
|
||||||
[{i, Dir} || Dir <- filelib:wildcard(filename:join(["apps", "**", "include"]))] ++
|
[{i, Dir} || Dir <- filelib:wildcard(filename:join(["apps", "*", "include"]))] ++
|
||||||
[{i, Dir} || Dir <- filelib:wildcard(filename:join([extra_lib_dir(), "**", "include"]))].
|
[{i, Dir} || Dir <- filelib:wildcard(filename:join([extra_lib_dir(), "*", "include"]))].
|
||||||
|
|
||||||
dialyzer(Config) ->
|
dialyzer(Config) ->
|
||||||
{dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),
|
{dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),
|
||||||
|
|
|
@ -15,17 +15,17 @@ apps=(
|
||||||
"emqx_auth_redis"
|
"emqx_auth_redis"
|
||||||
"emqx_bridge_mqtt"
|
"emqx_bridge_mqtt"
|
||||||
"emqx_coap"
|
"emqx_coap"
|
||||||
"emqx_dashboard"
|
# "emqx_dashboard" # moved to lib-opensource
|
||||||
"emqx_exhook"
|
"emqx_exhook"
|
||||||
"emqx_exproto"
|
"emqx_exproto"
|
||||||
"emqx_lua_hook"
|
"emqx_lua_hook"
|
||||||
"emqx_lwm2m"
|
"emqx_lwm2m"
|
||||||
"emqx_management"
|
# "emqx_management" # moved to lib-opensource
|
||||||
"emqx_prometheus"
|
"emqx_prometheus"
|
||||||
"emqx_psk_file"
|
"emqx_psk_file"
|
||||||
"emqx_recon"
|
"emqx_recon"
|
||||||
"emqx_retainer"
|
"emqx_retainer"
|
||||||
"emqx_rule_engine"
|
# "emqx_rule_engine" # moved to lib-opensource
|
||||||
"emqx_sasl"
|
"emqx_sasl"
|
||||||
"emqx_sn"
|
"emqx_sn"
|
||||||
"emqx_stomp"
|
"emqx_stomp"
|
||||||
|
|
Loading…
Reference in New Issue