diff options
Diffstat (limited to 'src/rebar_lock.erl')
-rw-r--r-- | src/rebar_lock.erl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/rebar_lock.erl b/src/rebar_lock.erl index a973ccc..2a54600 100644 --- a/src/rebar_lock.erl +++ b/src/rebar_lock.erl @@ -1,13 +1,7 @@ -module(rebar_lock). --export([update/3]). +-export([create/1]). create(State) -> - LockDeps = [], - ok = file:write_file("./rebar.lock", io_lib:format("~p.~n", [LockDeps])). - -update(State, App, Source) -> - New = rebar_fetch:new(rebar_app_info:dir(App), rebar_app_info:name(App), rebar_app_info:original_vsn(App), Source), - {ok, [Terms]} = file:consult("./rebar.lock"), - LockDeps = lists:keyreplace(rebar_app_info:name(App), 1, Terms, New), + LockDeps = rebar_state:get(State, locks, []), ok = file:write_file("./rebar.lock", io_lib:format("~p.~n", [LockDeps])). |