Current section

Files

Jump to
kafka_protocol rebar.config.script
Raw

rebar.config.script

IsRebar3 = erlang:function_exported(rebar3, main, 1),
case IsRebar3 of
true ->
CONFIG;
false ->
URLs = [ {snappyer, "https://github.com/zmstone/snappyer"}
, {crc32cer, "https://github.com/zmstone/crc32cer"}
],
Rebar3Deps = proplists:get_value(deps, CONFIG),
Rebar2Deps =
lists:map(
fun({Name, URL}) ->
Tag = proplists:get_value(Name, Rebar3Deps),
{Name, ".*", {git, URL, {tag, Tag}}}
end, URLs),
lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
end.