diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-09-12 10:53:20 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-09-12 11:03:16 -0500 |
commit | ef8fc6ab61cea0857b6197a4f41c664f40ddaf58 (patch) | |
tree | 356796d4ab57fb907890475316488598d865c999 /src | |
parent | adb2550b3a19ca8d22bdca73ab3180367e27dc2e (diff) |
parse versions in deps tree output and support checkouts
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_app_utils.erl | 2 | ||||
-rw-r--r-- | src/rebar_prv_deps_tree.erl | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index de13020..602fd42 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -149,7 +149,7 @@ dep_to_app(Parent, DepsDir, Name, Vsn, Source, IsLock, State) -> CheckoutsDir = ec_cnv:to_list(rebar_dir:checkouts_dir(State, Name)), AppInfo = case rebar_app_info:discover(CheckoutsDir) of {ok, App} -> - rebar_app_info:is_checkout(App, true); + rebar_app_info:source(rebar_app_info:is_checkout(App, true), checkout); not_found -> Dir = ec_cnv:to_list(filename:join(DepsDir, Name)), {ok, AppInfo0} = diff --git a/src/rebar_prv_deps_tree.erl b/src/rebar_prv_deps_tree.erl index 5986521..04c4837 100644 --- a/src/rebar_prv_deps_tree.erl +++ b/src/rebar_prv_deps_tree.erl @@ -39,15 +39,18 @@ format_error(Reason) -> %% Internal functions print_deps_tree(SrcDeps, Verbose, State) -> + Resources = rebar_state:resources(State), D = lists:foldl(fun(App, Dict) -> Name = rebar_app_info:name(App), Vsn = rebar_app_info:original_vsn(App), + AppDir = rebar_app_info:dir(App), + Vsn1 = rebar_utils:vcs_vsn(Vsn, AppDir, Resources), Source = rebar_app_info:source(App), Parent = rebar_app_info:parent(App), - dict:append_list(Parent, [{Name, Vsn, Source}], Dict) + dict:append_list(Parent, [{Name, Vsn1, Source}], Dict) end, dict:new(), SrcDeps), ProjectAppNames = [{rebar_app_info:name(App) - ,rebar_app_info:original_vsn(App) + ,rebar_utils:vcs_vsn(rebar_app_info:original_vsn(App), rebar_app_info:dir(App), Resources) ,project} || App <- rebar_state:project_apps(State)], io:setopts([{encoding, unicode}]), case dict:find(root, D) of @@ -80,6 +83,8 @@ print_children(Prefix, [{Name, Vsn, Source} | Rest], Dict, Verbose) -> type(project, _) -> "project app"; +type(checkout, _) -> + "checkout app"; type(Source, Verbose) when is_tuple(Source) -> case {element(1, Source), Verbose} of {pkg, _} -> |