-
Notifications
You must be signed in to change notification settings - Fork 1
/
rebar.config
127 lines (111 loc) · 3.76 KB
/
rebar.config
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
%% rebar plugins
{plugins, [rebar3_hex, rebar3_elixir]}.
%% eunit opts - Maven-like output formatting
{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "./test/eunit_results"}]}}]}.
%% Test coverage
{cover_enabled, true}.
%% Dialyzer
{dialyzer, [
{warnings, [error_handling, unknown]},
{plt_extra_apps, [ctool, ranch]}
]}.
%% deps options
{deps, [
{ctool, {git, "ssh://[email protected]:7999/vfs/ctool.git", {ref, "4f8b377c4e55"}}}
]}.
%% pre-hooks
{pre_hooks, [
{eunit, "mkdir -p test/eunit_results"} %% Make dir for eunit' surefire test results
]}.
{post_hooks, [
{release, "rm -f _build/*/rel/*/bin/install_upgrade.escript"},
{release, "rm -f _build/*/rel/*/bin/nodetool"},
{release, "rm -f _build/*/rel/*/bin/cluster_manager-*"},
{release, "rm -f _build/*/rel/*/bin/start_clean.boot"}
]}.
%% Cleanup
{clean_files, [
"test/eunit_results"
]}.
%% Erlang options, defines
{erl_opts, [{src_dirs, ["src"]}]}.
%% Add the tuple below to erl_opts proplist to turn on lager parse transform
%% (this is not needed as long as ctool logger is used)
%% {parse_transform, lager_transform}
%% Add the tuple below to erl_opts proplist to completely turn off debug messages
%% {d, skip_debug}
%% relx configuration
{relx, [
{release, {cluster_manager, "1.0.0"},
[
kernel,
stdlib,
sasl,
lager,
ctool,
%% deps included by default by reltool but not included by relx
{base64url, load},
{common_test, load},
{debugger, load},
{edoc, load},
{enacl, load},
{erts, load},
{eunit, load},
{inets, load},
{jiffy, load},
{macaroons, load},
{meck, load},
{mnesia, load},
{observer, load},
{runtime_tools, load},
{tools, load},
{wx, load},
{xmerl, load},
cluster_manager
]},
{vm_args, "rel/files/vm.args"},
{sys_config, "rel/files/app.config"},
{include_src, false},
{dev_mode, true},
% NOTE: {dev_mode, true} expands implicitly to {include_erts, false},
% so we need this line AFTER the dev mode to override this setting
{include_erts, true},
{overlay, [
%% Copy base files for starting and interacting w/ node
{copy, "node_package/priv/base/erl", "erts-{{erts_vsn}}/bin/erl"},
{copy, "node_package/priv/base/nodetool", "erts-{{erts_vsn}}/bin/nodetool"},
{template, "node_package/priv/base/runner", "bin/cluster_manager"},
{template, "node_package/priv/base/env.sh", "lib/env.sh"},
%% Copy config files
{mkdir, "etc"},
{copy, "rel/files/config.d", "etc/"},
{copy, "rel/files/autogenerated.config", "etc/autogenerated.config"},
{template, "rel/files/autogenerated.vm.args", "etc/autogenerated.vm.args"},
%% Copy additional data files
{mkdir, "data"},
{copy, "LICENSE.txt", "./data/"},
{template, "rel/files/app.config", "./data/app.config"},
{template, "rel/files/vm.args", "./data/vm.args"}
]},
{extended_start_script, true}]}.
%% Profiles configuration
{profiles, [
{package, [
{relx, [{dev_mode, false}]}
]}
]}.
%% Profiles configuration
{profiles, [
{package, [
{relx, [{dev_mode, false}]}
]},
{bamboo, [
{relx, [{dev_mode, false}]},
{post_hooks, [
{release, "rm -rf $REBAR_BUILD_DIR/../default/rel"},
{release, "mv -f $REBAR_BUILD_DIR/rel $REBAR_BUILD_DIR/../default"},
{release, "rm -rf $REBAR_BUILD_DIR/../default/lib/cluster_manager"},
{release, "mv -f $REBAR_BUILD_DIR/lib/cluster_manager $REBAR_BUILD_DIR/../default/lib"}
]}
]}
]}.