浏览代码

run hooks and plugins during clean for deps

find_apps didn't read config files so no hooks were in the app_infos,
and now that hooks are being done rebar needs plugins to be able
to run clean plugin hooks in deps.
pull/1698/head
Carl-Johan Kjellander 7 年前
父节点
当前提交
fee322edb9
共有 2 个文件被更改,包括 9 次插入4 次删除
  1. +8
    -3
      src/rebar_app_discover.erl
  2. +1
    -1
      src/rebar_prv_clean.erl

+ 8
- 3
src/rebar_app_discover.erl 查看文件

@ -331,14 +331,19 @@ create_app_info(AppInfo, AppDir, AppFile) ->
AppInfo2 = rebar_app_info:applications(
rebar_app_info:app_details(AppInfo1, AppDetails),
IncludedApplications++Applications),
Valid = case rebar_app_utils:validate_application_info(AppInfo2) =:= true
andalso rebar_app_info:has_all_artifacts(AppInfo2) =:= true of
C = rebar_config:consult(AppDir),
AppInfo3 = rebar_app_info:update_opts(AppInfo2,
rebar_app_info:opts(AppInfo2), C),
?DEBUG("create_app_info(~p, ~p, ~p) -> ~n~p~n",
[AppInfo, AppDir, AppFile, AppInfo3]),
Valid = case rebar_app_utils:validate_application_info(AppInfo3) =:= true
andalso rebar_app_info:has_all_artifacts(AppInfo3) =:= true of
true ->
true;
_ ->
false
end,
rebar_app_info:dir(rebar_app_info:valid(AppInfo2, Valid), AppDir).
rebar_app_info:dir(rebar_app_info:valid(AppInfo3, Valid), AppDir).
%% @doc Read in and parse the .app file if it is availabe. Do the same for
%% the .app.src file if it exists.

+ 1
- 1
src/rebar_prv_clean.erl 查看文件

@ -12,7 +12,7 @@
-include("rebar.hrl").
-define(PROVIDER, clean).
-define(DEPS, [app_discovery]).
-define(DEPS, [app_discovery, install_deps]).
%% ===================================================================
%% Public API

正在加载...
取消
保存