From 6967c1d6b20d12643cba71f848c331c8ccf4f196 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 3 Sep 2014 09:13:00 -0500 Subject: update works, but still needs to cause update of deps --- src/rebar_prv_update.erl | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl index e37c08d..d413af2 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -35,21 +35,16 @@ do(State) -> [Name] -> ?INFO("Updating ~s~n", [Name]), - DepsDir = rebar_prv_deps:get_deps_dir(State), - Deps = rebar_state:get_local(State, deps, []), + DepsDir = rebar_prv_install_deps:get_deps_dir(State), + Deps = rebar_state:get(State, deps, []), {_, _, Source} = lists:keyfind(list_to_atom(Name), 1, Deps), - TargetDir = rebar_prv_deps:get_deps_dir(DepsDir, Name), + TargetDir = rebar_prv_install_deps:get_deps_dir(DepsDir, Name), rebar_fetch:update_source1(TargetDir, Source), - - [App] = rebar_app_discover:find_apps([TargetDir]), - - {ok, AppInfo1} = rebar_otp_app:compile(State, App), - State1 = rebar_state:replace_app(State, rebar_app_info:name(AppInfo1), AppInfo1), - rebar_erlc_compiler:compile(State, rebar_app_info:dir(AppInfo1)), - - %update_lock_file(State, AppInfo1, Source), - - {ok, State1}; + State1 = rebar_state:set(State, locks, []), + {ok, State2} = rebar_prv_install_deps:do(State1), + {ok, State3} = rebar_prv_lock:do(State2), + {ok, State4} = rebar_prv_compile:do(State3), + {ok, State4}; [] -> ?INFO("Updating package index...~n", []), Url = url(State), -- cgit v1.1