Removed rebar2 case in rebar.config.script
* introduced by 505d35996d
* rebar2 is now deprecated [1].
[1] https://github.com/rebar/rebar
This commit is contained in:
parent
182c30a950
commit
f9ffd1ce6b
1 changed files with 5 additions and 22 deletions
|
@ -1,24 +1,7 @@
|
||||||
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.2"}}}
|
|
||||||
],
|
|
||||||
|
|
||||||
NoDialWarns = {dialyzer, [{warnings, [no_unknown]}]},
|
NoDialWarns = {dialyzer, [{warnings, [no_unknown]}]},
|
||||||
OTPRelease = erlang:list_to_integer(erlang:system_info(otp_release)),
|
OTPRelease = erlang:list_to_integer(erlang:system_info(otp_release)),
|
||||||
WarnsRemoved = case OTPRelease<26 of
|
|
||||||
true -> fun(Config) -> Config end;
|
|
||||||
false -> fun(Config) -> lists:keystore(dialyzer, 1, Config, NoDialWarns) end
|
|
||||||
end,
|
|
||||||
|
|
||||||
case IsRebar3 of
|
case OTPRelease<26 of
|
||||||
true -> WarnsRemoved(CONFIG);
|
true -> CONFIG;
|
||||||
false ->
|
false -> lists:keystore(dialyzer, 1, CONFIG, NoDialWarns)
|
||||||
lists:keyreplace(deps, 1, WarnsRemoved(CONFIG), {deps, Rebar2Deps})
|
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue