summaryrefslogtreecommitdiff
path: root/src/rebar_hooks.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_hooks.erl')
-rw-r--r--src/rebar_hooks.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rebar_hooks.erl b/src/rebar_hooks.erl
index a5ab048..3af17ca 100644
--- a/src/rebar_hooks.erl
+++ b/src/rebar_hooks.erl
@@ -2,6 +2,7 @@
-export([run_all_hooks/5
,run_all_hooks/6
+ ,run_project_and_app_hooks/5
,format_error/1]).
-include("rebar.hrl").
@@ -20,6 +21,11 @@ run_all_hooks(Dir, Type, Command, Providers, State) ->
run_provider_hooks(Dir, Type, Command, Providers, rebar_state:opts(State), State),
run_hooks(Dir, Type, Command, rebar_state:opts(State), State).
+run_project_and_app_hooks(Dir, Type, Command, Providers, State) ->
+ ProjectApps = rebar_state:project_apps(State),
+ [rebar_hooks:run_all_hooks(Dir, Type, Command, Providers, AppInfo, State) || AppInfo <- ProjectApps],
+ run_all_hooks(Dir, Type, Command, Providers, State).
+
run_provider_hooks(Dir, Type, Command, Providers, Opts, State) ->
case rebar_opts:get(Opts, provider_hooks, []) of
[] ->