mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Merge branch 'master' of github.com:/basho/rebar
This commit is contained in:
commit
516acd43b7
1 changed files with 20 additions and 8 deletions
|
@ -69,15 +69,27 @@ preprocess(Config, _) ->
|
||||||
%% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
|
%% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
|
||||||
%% the current command doesn't run on the dep dir. However, pre/postprocess
|
%% the current command doesn't run on the dep dir. However, pre/postprocess
|
||||||
%% WILL run (and we want it to) for transitivity purposes.
|
%% WILL run (and we want it to) for transitivity purposes.
|
||||||
|
%%
|
||||||
|
%% Also, if skip_deps=comma,separated,app,list, then only the given
|
||||||
|
%% dependencies are skipped.
|
||||||
NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
|
NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
|
||||||
"true" ->
|
"true" ->
|
||||||
lists:foldl(
|
lists:foldl(
|
||||||
fun(#dep{dir = Dir}, C) ->
|
fun(#dep{dir = Dir}, C) ->
|
||||||
rebar_config:set_skip_dir(C, Dir)
|
rebar_config:set_skip_dir(C, Dir)
|
||||||
end, Config3, AvailableDeps);
|
end, Config3, AvailableDeps);
|
||||||
_ ->
|
Apps when is_list(Apps) ->
|
||||||
Config3
|
SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
|
||||||
end,
|
lists:foldl(
|
||||||
|
fun(#dep{dir = Dir, app = App}, C) ->
|
||||||
|
case lists:member(App, SkipApps) of
|
||||||
|
true -> rebar_config:set_skip_dir(C, Dir);
|
||||||
|
false -> C
|
||||||
|
end
|
||||||
|
end, Config3, AvailableDeps);
|
||||||
|
_ ->
|
||||||
|
Config3
|
||||||
|
end,
|
||||||
|
|
||||||
%% Filtering out 'raw' dependencies so that no commands other than
|
%% Filtering out 'raw' dependencies so that no commands other than
|
||||||
%% deps-related can be executed on their directories.
|
%% deps-related can be executed on their directories.
|
||||||
|
|
Loading…
Reference in a new issue