Skip to content

Commit

Permalink
add rebar.config.script to fall back to rebar2 style deps if using re…
Browse files Browse the repository at this point in the history
…bar2
  • Loading branch information
tsloughter committed Nov 2, 2015
1 parent 8c1b113 commit 505d359
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions rebar.config.script
@@ -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.
2 changes: 1 addition & 1 deletion src/erlware_commons.app.src
@@ -1,6 +1,6 @@
{application,erlware_commons,
[{description,"Additional standard library for Erlang"},
{vsn,"0.16.1"},
{vsn,"0.18.0"},
{modules,[]},
{registered,[]},
{applications,[kernel,stdlib]},
Expand Down

0 comments on commit 505d359

Please sign in to comment.