forked from esl/escalus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.config.script
21 lines (19 loc) · 969 Bytes
/
rebar.config.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ExtraDeps = [
{mongooseim, ".*",
{git, "git://github.com/esl/mongooseim", "1.6.0"}}
].
AddExtraDeps = fun (Deps) ->
case os:getenv("ESCALUS_EXTRA_DEPS") of
false -> Deps;
SDepNames ->
ExtraDepNames = [list_to_atom(Dep)
|| Dep <- string:tokens(SDepNames, " ")],
Deps ++ lists:filter(fun (DepDefinition) ->
DepName = element(1, DepDefinition),
lists:member(DepName, ExtraDepNames)
end, ExtraDeps)
end
end.
{deps, Deps} = lists:keyfind(deps, 1, CONFIG),
NewDeps = AddExtraDeps(Deps),
lists:keystore(deps, 1, CONFIG, {deps, NewDeps}).