diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2016-02-28 11:50:40 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2016-02-28 11:50:40 -0500 |
commit | a0b2c743566fcfae543ba758b954ec465db6fcfd (patch) | |
tree | bc05b44242ac7df355194440c7946002e3ee1d7b /src/rebar_hooks.erl | |
parent | 47a0a20a3cc649303a31368dee82012983512d72 (diff) | |
parent | c36e9bf791e90b27cb0c9657cf245049a3595572 (diff) |
Merge pull request #1091 from tsloughter/all_hooks
Run all hooks
Diffstat (limited to 'src/rebar_hooks.erl')
-rw-r--r-- | src/rebar_hooks.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rebar_hooks.erl b/src/rebar_hooks.erl index 4e6d486..769890f 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 [] -> |