diff --git a/rebar.lock.script b/rebar.lock.script new file mode 100644 index 0000000..534e836 --- /dev/null +++ b/rebar.lock.script @@ -0,0 +1,29 @@ +%% -*- erlang -*- + +FilterCheck = (os:getenv("AE_DISABLE_CUCKOO") =/= false), +RemoveApps = [<<"aecuckoo">>, <<"aecuckooprebuilt">>], + +Filter = fun(Apps) -> + case FilterCheck of + false -> + Apps; + true -> + lists:foldl( + fun(App, Acc) -> + lists:keydelete(App, 1, Acc) + end, + Apps, + RemoveApps + ) + end + end, + +case CONFIG of + [] -> + %% no lock file present, usually during unlock/upgrade + CONFIG; + [{Version, Deps}, [{pkg_hash, Pkgs}]] -> + Deps1 = Filter(Deps), + Pkgs1 = Filter(Pkgs), + [{Version, Deps1}, [{pkg_hash, Pkgs1}]] +end.