chore: remove lib-ee in scripts
This commit is contained in:
parent
e069680bca
commit
d753edc0fd
|
@ -40,7 +40,7 @@ jobs:
|
|||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: "emqx_dialyzer_${{ matrix.otp }}_plt"
|
||||
key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*', 'lib-ee/*/rebar.*') }}
|
||||
key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*') }}
|
||||
restore-keys: |
|
||||
rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
|
||||
- name: run static checks
|
||||
|
|
2
Makefile
2
Makefile
|
@ -296,7 +296,7 @@ $(foreach tt,$(ALL_ELIXIR_TGZS),$(eval $(call gen-elixir-tgz-target,$(tt))))
|
|||
|
||||
.PHONY: fmt
|
||||
fmt: $(REBAR)
|
||||
@$(SCRIPTS)/erlfmt -w '{apps,lib-ee}/*/{src,include,priv,test,integration_test}/**/*.{erl,hrl,app.src,eterm}'
|
||||
@$(SCRIPTS)/erlfmt -w 'apps/*/{src,include,priv,test,integration_test}/**/*.{erl,hrl,app.src,eterm}'
|
||||
@$(SCRIPTS)/erlfmt -w 'rebar.config.erl'
|
||||
@mix format
|
||||
|
||||
|
|
7
dev
7
dev
|
@ -336,13 +336,6 @@ copy_other_conf_files() {
|
|||
is_current_profile_app() {
|
||||
local app="$1"
|
||||
case "$app" in
|
||||
lib-ee*)
|
||||
if [ "$PROFILE" = 'emqx-enterprise' ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*emqx_telemetry*)
|
||||
if [ "$PROFILE" = 'emqx-enterprise' ]; then
|
||||
return 1
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[
|
||||
{config,
|
||||
[
|
||||
#{dirs => ["src", "apps/**/src", "lib-ee/**/src"],
|
||||
#{dirs => ["src", "apps/**/src"],
|
||||
filter => "*.erl",
|
||||
ruleset => erl_files,
|
||||
rules => [
|
||||
|
|
15
mix.exs
15
mix.exs
|
@ -169,24 +169,10 @@ defmodule EMQXUmbrella.MixProject do
|
|||
end
|
||||
|
||||
defp enterprise_apps(_profile_info = %{edition_type: :enterprise}) do
|
||||
umbrella_apps =
|
||||
Enum.map(enterprise_umbrella_apps(), fn app_name ->
|
||||
path = "apps/#{app_name}"
|
||||
{app_name, path: path, manager: :rebar3, override: true}
|
||||
end)
|
||||
|
||||
"lib-ee/*"
|
||||
|> Path.wildcard()
|
||||
|> Enum.filter(&File.dir?/1)
|
||||
|> Enum.map(fn path ->
|
||||
app =
|
||||
path
|
||||
|> Path.basename()
|
||||
|> String.to_atom()
|
||||
|
||||
{app, path: path, manager: :rebar3, override: true}
|
||||
end)
|
||||
|> Enum.concat(umbrella_apps)
|
||||
end
|
||||
|
||||
defp enterprise_apps(_profile_info) do
|
||||
|
@ -220,6 +206,7 @@ defmodule EMQXUmbrella.MixProject do
|
|||
:emqx_bridge_rabbitmq,
|
||||
:emqx_bridge_clickhouse,
|
||||
:emqx_ft,
|
||||
:emqx_license,
|
||||
:emqx_s3,
|
||||
:emqx_schema_registry,
|
||||
:emqx_enterprise,
|
||||
|
|
|
@ -164,11 +164,7 @@ project_app_dirs(Edition) ->
|
|||
|| Path <- filelib:wildcard("apps/*"),
|
||||
is_community_umbrella_app(Path) orelse IsEnterprise
|
||||
],
|
||||
UmbrellaApps ++
|
||||
case IsEnterprise of
|
||||
true -> ["lib-ee/*"];
|
||||
false -> []
|
||||
end.
|
||||
UmbrellaApps.
|
||||
|
||||
plugins() ->
|
||||
[
|
||||
|
@ -539,8 +535,7 @@ provide_bcrypt_release(ReleaseType) ->
|
|||
|
||||
erl_opts_i() ->
|
||||
[{i, "apps"}] ++
|
||||
[{i, Dir} || Dir <- filelib:wildcard(filename:join(["apps", "*", "include"]))] ++
|
||||
[{i, Dir} || Dir <- filelib:wildcard(filename:join(["lib-ee", "*", "include"]))].
|
||||
[{i, Dir} || Dir <- filelib:wildcard(filename:join(["apps", "*", "include"]))].
|
||||
|
||||
dialyzer(Config) ->
|
||||
{dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),
|
||||
|
@ -597,7 +592,7 @@ coveralls() ->
|
|||
[]
|
||||
end.
|
||||
|
||||
app_names() -> list_dir("apps") ++ list_dir("lib-ee").
|
||||
app_names() -> list_dir("apps").
|
||||
|
||||
list_dir(Dir) ->
|
||||
case filelib:is_dir(Dir) of
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
-mode(compile).
|
||||
|
||||
main([]) ->
|
||||
Files = ["rebar.config"] ++
|
||||
apps_rebar_config("apps") ++
|
||||
apps_rebar_config("lib-ee"),
|
||||
Files = ["rebar.config"] ++ apps_rebar_config("apps"),
|
||||
Deps = collect_deps(Files, #{}),
|
||||
case count_bad_deps(Deps) of
|
||||
0 ->
|
||||
|
|
|
@ -98,33 +98,18 @@ if [ ! -d "${WHICH_APP}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${WHICH_APP}" == lib-ee* && (-z "${PROFILE+x}" || "${PROFILE}" != emqx-enterprise) ]]; then
|
||||
echo 'You are trying to run an enterprise test case without the emqx-enterprise profile.'
|
||||
echo 'This will most likely not work.'
|
||||
echo ''
|
||||
echo 'Run "export PROFILE=emqx-enterprise" and "make" to fix this'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ERLANG_CONTAINER='erlang'
|
||||
DOCKER_CT_ENVS_FILE="${WHICH_APP}/docker-ct"
|
||||
|
||||
case "${WHICH_APP}" in
|
||||
lib-ee*)
|
||||
## ensure enterprise profile when testing lib-ee applications
|
||||
export PROFILE='emqx-enterprise'
|
||||
;;
|
||||
apps/*)
|
||||
if [[ -f "${WHICH_APP}/BSL.txt" ]]; then
|
||||
if [ -f "${WHICH_APP}/BSL.txt" ]; then
|
||||
if [ -n "${PROFILE:-}" ] && [ "${PROFILE}" != 'emqx-enterprise' ]; then
|
||||
echo "bad_profile: PROFILE=${PROFILE} will not work for app ${WHICH_APP}"
|
||||
exit 1
|
||||
fi
|
||||
export PROFILE='emqx-enterprise'
|
||||
else
|
||||
export PROFILE='emqx'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
export PROFILE="${PROFILE:-emqx}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f "$DOCKER_CT_ENVS_FILE" ]; then
|
||||
# shellcheck disable=SC2002
|
||||
|
|
|
@ -41,9 +41,7 @@ find_app() {
|
|||
"$FIND" "${appdir}" -mindepth 1 -maxdepth 1 -type d
|
||||
}
|
||||
|
||||
CE="$(find_app 'apps')"
|
||||
EE="$(find_app 'lib-ee')"
|
||||
APPS_ALL="$(echo -e "${CE}\n${EE}")"
|
||||
APPS_ALL="$(find_app 'apps')"
|
||||
|
||||
if [ "$MODE" = 'list' ]; then
|
||||
echo "${APPS_ALL}"
|
||||
|
@ -87,9 +85,6 @@ describe_app() {
|
|||
profile='emqx'
|
||||
fi
|
||||
;;
|
||||
lib-ee/*)
|
||||
profile='emqx-enterprise'
|
||||
;;
|
||||
*)
|
||||
echo "unknown app: $app"
|
||||
exit 1
|
||||
|
|
|
@ -72,12 +72,6 @@ while [ "$#" -gt 0 ]; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ "$TAG_PREFIX" = 'v' ]; then
|
||||
SRC_DIRS="{apps}"
|
||||
else
|
||||
SRC_DIRS="{apps,lib-ee}"
|
||||
fi
|
||||
|
||||
## make sure we build here in bash and always pass --skip-build to escript
|
||||
if [ "${SKIP_BUILD:-}" != 'yes' ]; then
|
||||
make "${PROFILE}"
|
||||
|
@ -114,7 +108,7 @@ PREV_REL_DIR="${PREV_DIR_BASE}/${PREV_TAG}/_build/${PROFILE}/lib"
|
|||
# this in turn makes quoting "${ESCRIPT_ARGS[@]}" problematic, hence disable SC2068 check here
|
||||
# shellcheck disable=SC2068
|
||||
./scripts/update_appup.escript \
|
||||
--src-dirs "${SRC_DIRS}/**" \
|
||||
--src-dirs "apps/**" \
|
||||
--release-dir "_build/${PROFILE}/lib" \
|
||||
--prev-release-dir "${PREV_REL_DIR}" \
|
||||
--skip-build \
|
||||
|
|
Loading…
Reference in New Issue