forked from aeternity/aeternity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.lock.script
30 lines (26 loc) · 1002 Bytes
/
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}]] ->
Deps1 = FilterRocksDb(Deps),
Pkgs1 = FilterRocksDb(Pkgs),
[{Version, Deps1}, [{pkg_hash, Pkgs1}]]
end.