File: rebar.config.script

package info (click to toggle)
erlang-erlware-commons 1.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 400 kB
  • sloc: erlang: 4,338; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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"}}}
             ],

case IsRebar3 of
    true -> CONFIG;
    false ->
        lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
end.