diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2017-10-30 15:55:10 +0300 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2017-10-30 15:55:10 +0300 |
commit | 9b8ae80dabc8e194613a27cd52d0dcfab06b1fca (patch) | |
tree | 0b02186b3533f1ae271643536b800882a8abbf13 /rebar.config.script | |
parent | 0633dd5802f60fd71359af40fcb80e0a0cae534d (diff) |
Improve --enable-system-deps
Diffstat (limited to 'rebar.config.script')
-rw-r--r-- | rebar.config.script | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/rebar.config.script b/rebar.config.script index 219514a2f..85f918fff 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -229,13 +229,22 @@ TestConfig = case file:read_file_info(TestConfigFile) of "" end, -ResolveDepPath = case IsRebar3 of - true -> +ResolveDepPath = case {SystemDeps, IsRebar3} of + {true, _} -> fun("deps/" ++ Rest) -> Slash = string:str(Rest, "/"), - Dir = "_build/default/lib/" ++ - string:sub_string(Rest, 1, Slash - 1), - Dir ++ string:sub_string(Rest, Slash); + code:lib_dir( + string:sub_string(Rest, 1, Slash -1)) ++ + string:sub_string(Rest, Slash); + (Path) -> + Path + end; + {_, true} -> + fun("deps/" ++ Rest) -> + Slash = string:str(Rest, "/"), + "_build/default/lib/" ++ + string:sub_string(Rest, 1, Slash - 1) ++ + string:sub_string(Rest, Slash); (Path) -> Path end; @@ -326,7 +335,7 @@ Rules = [ AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", "master"}}]), []}, {[post_hooks], [cover_enabled], os:getenv("TRAVIS") == "true", AppendList2(TravisPostHooks), [], false}, - {[overrides], [post_hook_configure], true, + {[overrides], [post_hook_configure], SystemDeps == false, AppendList2(GenDepsConfigure), [], []}, {[ct_extra_params], [eunit_compile_opts], true, AppendStr2(CtParams), "", []}, |