forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist.relx.config.script
33 lines (27 loc) · 1007 Bytes
/
dist.relx.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
26
27
28
29
30
31
32
VSN = case os:getenv("KZ_VERSION") of
'false' ->
[C || C <- os:cmd("scripts/next_version 2>/dev/null"), C =/= $\n];
Version -> Version
end,
ToName = fun (App) -> list_to_atom(hd(string:tokens(App,"-"))) end,
Core = [list_to_atom(App) || "core/"++App = Dir <- filelib:wildcard( "core/*"), filelib:is_dir(Dir)],
Deps = [list_to_atom(App) || "deps/"++App = Dir <- filelib:wildcard( "deps/*"), filelib:is_dir(Dir)],
ToFilterOut = [rabbitmq_codegen
,'.erlang.mk'
,'ci.erlang.mk'
,'.settings'
,skel
,parse_trans
,meck
,elvis_mk
],
Preparer = fun (List) -> [{E, load} || E <- List, not lists:member(E, ToFilterOut)] end,
Base = [runtime_tools
,tools
,sasl
],
BASE = [{default_release, {kazoo, VSN}}
,{release, {kazoo, VSN}
,Base ++ Preparer(Core ++ Deps)
}],
CONFIG ++ BASE.