diff options
-rw-r--r-- | src/rebar_prv_edoc.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rebar_prv_edoc.erl b/src/rebar_prv_edoc.erl index e7048b6..6cefe14 100644 --- a/src/rebar_prv_edoc.erl +++ b/src/rebar_prv_edoc.erl @@ -32,13 +32,19 @@ init(State) -> do(State) -> code:add_pathsa(rebar_state:code_paths(State, all_deps)), ProjectApps = rebar_state:project_apps(State), + Providers = rebar_state:providers(State), EDocOpts = rebar_state:get(State, edoc_opts, []), + Cwd = rebar_state:dir(State), + rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State), lists:foreach(fun(AppInfo) -> + rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, AppInfo, State), AppName = ec_cnv:to_list(rebar_app_info:name(AppInfo)), ?INFO("Running edoc for ~s", [AppName]), AppDir = rebar_app_info:dir(AppInfo), - ok = edoc:application(list_to_atom(AppName), AppDir, EDocOpts) + ok = edoc:application(list_to_atom(AppName), AppDir, EDocOpts), + rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, AppInfo, State) end, ProjectApps), + rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State), rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)), {ok, State}. |