18 lines
554 B
Text
18 lines
554 B
Text
IsRebar3 = case application:get_key(rebar, vsn) of
|
|
{ok, VSN} ->
|
|
[VSN1 | _] = string:tokens(VSN, "-"),
|
|
[Maj, Min, Patch] = string:tokens(VSN1, "."),
|
|
(list_to_integer(Maj) >= 3);
|
|
undefined ->
|
|
false
|
|
end,
|
|
|
|
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.
|