add rebar.config.script to fall back to rebar2 style deps if using rebar2
This commit is contained in:
parent
8c1b1133de
commit
505d35996d
2 changed files with 16 additions and 1 deletions
15
rebar.config.script
Normal file
15
rebar.config.script
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{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.
|
|
@ -1,6 +1,6 @@
|
||||||
{application,erlware_commons,
|
{application,erlware_commons,
|
||||||
[{description,"Additional standard library for Erlang"},
|
[{description,"Additional standard library for Erlang"},
|
||||||
{vsn,"0.16.1"},
|
{vsn,"0.18.0"},
|
||||||
{modules,[]},
|
{modules,[]},
|
||||||
{registered,[]},
|
{registered,[]},
|
||||||
{applications,[kernel,stdlib]},
|
{applications,[kernel,stdlib]},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue