forked from lbakerchef/erlcloud
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rebar.config.script
25 lines (25 loc) · 1.17 KB
/
rebar.config.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%% -*- mode: erlang; -*-
case erlang:function_exported(rebar3, main, 1) of
true -> % rebar3
CONFIG;
false -> % rebar 2.x or older
%% Use git-based deps
%% profiles
CONFIG_DEPS =
[{deps, [{meck, ".*",{git, "https://github.com/eproxus/meck.git", {tag, "0.9.0"}}},
{jsx, ".*", {git, "https://github.com/talentdeficit/jsx.git", {tag, "v2.11.0"}}},
%% {hackney, ".*", {git, "git://github.com/benoitc/hackney.git", {tag, "1.2.0"}}},
{eini, ".*", {git, "https://github.com/erlcloud/eini.git", {tag, "1.2.9"}}},
{lhttpc, ".*", {git, "https://github.com/erlcloud/lhttpc.git", {tag, "1.6.2"}}},
{base16, ".*", {git, "https://github.com/goj/base16.git", {tag, "1.0.0"}}}]}
| lists:keydelete(deps, 1, CONFIG)],
CONFIG_NEW =
case os:getenv("WARNINGS_AS_ERRORS") of
"true" ->
[{erl_opts, [warnings_as_errors | proplists:get_value(erl_opts, CONFIG_DEPS)]}
| lists:keydelete(erl_opts, 1, CONFIG_DEPS)];
_ ->
CONFIG_DEPS
end,
CONFIG_NEW
end.