diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-09-03 09:13:00 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-09-03 09:13:00 -0500 |
commit | 6967c1d6b20d12643cba71f848c331c8ccf4f196 (patch) | |
tree | 11c4d6fa5fbe904fb45af63f4274b92dbc1443b7 | |
parent | 4ed688f0ddf29747cebe9b59072c89fd5fa0c621 (diff) |
update works, but still needs to cause update of deps
-rw-r--r-- | src/rebar_prv_update.erl | 21 |
1 files changed, 8 insertions, 13 deletions
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), |