summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-04-20 19:47:16 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-04-20 19:47:16 -0400
commitb5ef1c09d77268348f2962938519774a11817ce4 (patch)
tree2b74eb9826bdf6eab2c74812e98aa91ae6e8435a
parent520855ee42c01da17a27dc721fddee0ca1e79b72 (diff)
parent9e59abacf3c9b811b11f2a2fdae26286c0bebdd6 (diff)
Merge pull request #356 from tsloughter/compile_pre_hooks
run project wide pre-compile hooks after deps have compiled
-rw-r--r--src/rebar_prv_compile.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 15a5164..f3edebc 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -36,8 +36,6 @@ do(State) ->
Deps = rebar_state:deps_to_build(State),
Cwd = rebar_dir:get_cwd(),
- rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State),
-
%% Need to allow global config vars used on deps
%% Right now no way to differeniate and just give deps a new state
EmptyState = rebar_state:new(),
@@ -45,6 +43,9 @@ do(State) ->
{ok, ProjectApps1} = rebar_digraph:compile_order(ProjectApps),
+ %% Run top level hooks *before* project apps compiled but *after* deps are
+ rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State),
+
ProjectApps2 = build_apps(State, Providers, ProjectApps1),
State2 = rebar_state:project_apps(State, ProjectApps2),