erlware_commons/rebar.config.script

15 lines
406 B
Text

{ok, VSN} = application:get_key(rebar, vsn),
[VSN1 | _] = string:tokens(VSN, "-"),
[Maj, Min, Patch] = string:tokens(VSN1, "."),
IsRebar3 = (list_to_integer(Maj) >= 3),
Rebar2Deps = [
{cf, ".*", {git, "https://github.com/project-fifo/cf", {tag, "0.2.0"}}}
],
case IsRebar3 of
true -> CONFIG;
false ->
lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
end.