erlware_commons/rebar.config.script
Ómar Kjartan Yasin 0c1636e75a Fix script so it can compile git-versioned
rebar3 variables as that is the way these versions
can look when updated using
`rebar3 local upgrade`.
2016-03-10 10:46:39 -08:00

17 lines
504 B
Text

IsRebar3 = case application:get_key(rebar, vsn) of
{ok, Vsn} ->
[MajorVersion|_] = string:tokens(Vsn, "."),
(list_to_integer(MajorVersion) >= 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.