Ver código fonte

Merge pull request #356 from tsloughter/compile_pre_hooks

run project wide pre-compile hooks after deps have compiled
pull/361/head
Fred Hebert 10 anos atrás
pai
commit
b5ef1c09d7
1 arquivos alterados com 3 adições e 2 exclusões
  1. +3
    -2
      src/rebar_prv_compile.erl

+ 3
- 2
src/rebar_prv_compile.erl Ver arquivo

@ -36,8 +36,6 @@ do(State) ->
Deps = rebar_state:deps_to_build(State), Deps = rebar_state:deps_to_build(State),
Cwd = rebar_dir:get_cwd(), Cwd = rebar_dir:get_cwd(),
rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, State),
%% Need to allow global config vars used on deps %% Need to allow global config vars used on deps
%% Right now no way to differeniate and just give deps a new state %% Right now no way to differeniate and just give deps a new state
EmptyState = rebar_state:new(), EmptyState = rebar_state:new(),
@ -45,6 +43,9 @@ do(State) ->
{ok, ProjectApps1} = rebar_digraph:compile_order(ProjectApps), {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), ProjectApps2 = build_apps(State, Providers, ProjectApps1),
State2 = rebar_state:project_apps(State, ProjectApps2), State2 = rebar_state:project_apps(State, ProjectApps2),

Carregando…
Cancelar
Salvar