forked from aeternity/aeternity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.lock.script
30 lines (26 loc) · 1.01 KB
/
rebar.lock.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
%% -*- erlang -*-
IsWindows = case os:type() of {win32, _} -> true; {_, _} -> false end,
FilterRocksDbCheck = (IsWindows orelse os:getenv("AE_DISABLE_ROCKSDB") =/= false),
FilterRocksDb = fun(Apps) ->
case FilterRocksDbCheck of
false ->
Apps;
true ->
lists:foldl(
fun(App, Acc) ->
lists:keydelete(App, 1, Acc)
end,
Apps,
[<<"rocksdb">>, <<"mnesia_rocksdb">>]
)
end
end,
case CONFIG of
[] ->
%% no lock file present, usually during unlock/upgrade
CONFIG;
[{Version, Deps}, [{pkg_hash, Pkgs} | Rest] | Rest1] ->
Deps1 = FilterRocksDb(Deps),
Pkgs1 = FilterRocksDb(Pkgs),
[{Version, Deps1}, [{pkg_hash, Pkgs1} | Rest] | Rest1]
end.