From 26892b9d41433150db871d4c4f2ff6d66069c0de Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 2 Nov 2014 18:40:25 -0600 Subject: wip: upgrade pkg deps --- src/rebar_app_info.erl | 2 +- src/rebar_prv_upgrade.erl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl index 7a33811..47dfcad 100644 --- a/src/rebar_app_info.erl +++ b/src/rebar_app_info.erl @@ -38,7 +38,7 @@ original_vsn :: binary() | string() | undefined, app_details=[] :: list(), deps=[] :: list(), - dep_level :: integer(), + dep_level=0 :: integer(), dir :: file:name(), source :: string() | tuple() | undefined, valid :: boolean()}). diff --git a/src/rebar_prv_upgrade.erl b/src/rebar_prv_upgrade.erl index 1668e1c..50e1452 100644 --- a/src/rebar_prv_upgrade.erl +++ b/src/rebar_prv_upgrade.erl @@ -38,7 +38,6 @@ init(State) -> do(State) -> {Args, _} = rebar_state:command_parsed_args(State), Name = proplists:get_value(package, Args), - ?INFO("Updating ~s~n", [Name]), Locks = rebar_state:get(State, locks, []), case lists:keyfind(ec_cnv:to_binary(Name), 1, Locks) of {_, _, _, Level} -> @@ -46,6 +45,11 @@ do(State) -> Dep = lists:keyfind(list_to_atom(Name), 1, Deps), rebar_prv_install_deps:handle_deps(State, [Dep], {true, ec_cnv:to_binary(Name), Level}), {ok, State}; + {_, _, _, _, Level} -> + Deps = rebar_state:get(State, deps), + Dep = lists:keyfind(list_to_atom(Name), 1, Deps), + rebar_prv_install_deps:handle_deps(State, [Dep], {true, ec_cnv:to_binary(Name), Level}), + {ok, State}; _ -> {error, io_lib:format("No such dependency ~s~n", [Name])} end. -- cgit v1.1