diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2012-11-01 05:39:22 -0600 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2012-11-01 05:39:22 -0600 |
commit | 516acd43b72c5b8aef66d5419f36c47cbb180aeb (patch) | |
tree | 27bc669e844ed5e370a7a6faad2521480c31971a | |
parent | 5966880fe1afbcd5d3b7a8cb82f63b00b21e57ec (diff) | |
parent | 6eb7c084991c0c2b5633fe784a705666eab63f20 (diff) |
Merge branch 'master' of github.com:/basho/rebar
-rw-r--r-- | src/rebar_deps.erl | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index cd49343..074e929 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -69,15 +69,27 @@ preprocess(Config, _) -> %% 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 %% 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 - "true" -> - lists:foldl( - fun(#dep{dir = Dir}, C) -> - rebar_config:set_skip_dir(C, Dir) - end, Config3, AvailableDeps); - _ -> - Config3 - end, + "true" -> + lists:foldl( + fun(#dep{dir = Dir}, C) -> + rebar_config:set_skip_dir(C, Dir) + end, Config3, AvailableDeps); + Apps when is_list(Apps) -> + SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")], + 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 %% deps-related can be executed on their directories. |