summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl-Johan Kjellander <cjk@campanja.com>2017-12-19 13:29:53 +0100
committerCarl-Johan Kjellander <cjk@campanja.com>2018-01-19 16:11:15 +0100
commitfee322edb91bd04fc24287f28d94c08fe0632812 (patch)
tree9f5322696c4141a24d81340f60acca23f31024d8 /src
parenta3b5846b49f034854a7ea585d826ab69869320ef (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_app_discover.erl11
-rw-r--r--src/rebar_prv_clean.erl2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index cdd183c..1c02a48 100644
--- a/src/rebar_app_discover.erl
+++ b/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.
diff --git a/src/rebar_prv_clean.erl b/src/rebar_prv_clean.erl
index aa0b5af..4da0a64 100644
--- a/src/rebar_prv_clean.erl
+++ b/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