fix(scripts): update scripts to work with new lib-opensource dir

This commit is contained in:
Zaiming Shi 2021-02-10 22:24:41 +01:00
parent 8f477e8411
commit e7785a63ee
5 changed files with 13 additions and 9 deletions

View File

@ -2,6 +2,7 @@ REBAR_VERSION = 3.14.3-emqx-4
DASHBOARD_VERSION = v4.3.0
REBAR = $(CURDIR)/rebar3
BUILD = $(CURDIR)/build
export EMQX_ENTERPRISE=false
export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh)
PROFILE ?= emqx

View File

@ -5,7 +5,7 @@
[
{config,
[
#{dirs => ["apps/**/src", "src"],
#{dirs => ["src", "apps/**/src", "lib-opensource/**/src"],
filter => "*.erl",
ruleset => erl_files,
rules => [
@ -16,7 +16,7 @@
]}}
]
},
#{dirs => ["apps/**/test", "test"],
#{dirs => ["test", "apps/**/test", "lib-opensource/**/src"],
filter => "*.erl",
rules => [
{elvis_text_style, line_length, #{ limit => 100

View File

@ -1,6 +1,5 @@
#!/bin/sh
#!/bin/bash
#set -euo pipefail
set -eu
VERSION="$1"
@ -10,7 +9,11 @@ cd -P -- "$(dirname -- "$0")"
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
*Darwin*) SED="sed -E";;

View File

@ -279,7 +279,7 @@ provide_bcrypt_release(ReleaseType) ->
%% rebar3 does not handle umberella project's cross-app parse_transform well
compile_and_load_pase_transforms(Dir) ->
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],
lists:foreach(fun(PtFile) -> {ok, _Mod} = compile:file(path(Dir, PtFile), CompileOpts) end, PtFiles).

View File

@ -15,17 +15,17 @@ apps=(
"emqx_auth_redis"
"emqx_bridge_mqtt"
"emqx_coap"
"emqx_dashboard"
# "emqx_dashboard" # moved to lib-opensource
"emqx_exhook"
"emqx_exproto"
"emqx_lua_hook"
"emqx_lwm2m"
"emqx_management"
# "emqx_management" # moved to lib-opensource
"emqx_prometheus"
"emqx_psk_file"
"emqx_recon"
"emqx_retainer"
"emqx_rule_engine"
# "emqx_rule_engine" # moved to lib-opensource
"emqx_sasl"
"emqx_sn"
"emqx_stomp"