forked from aeternity/aeternity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebar.config
172 lines (156 loc) · 8.34 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
%% The requirements on the OTP version come mainly from the patches
%% for OTP modules - see `otp_patches/` - requiring the version of
%% certain OTP applications, e.g. `mnesia`, to be well known in order
%% for such patches to be applied deterministically.
%%
%% The expected patched OTP modules required for the OTP release are
%% copied explicitly one by one as part of the `relx` overlay
%% configuration (in this `rebar.config`), in order to prevent
%% silently skipping patches e.g. because not built.
%%
%% If the user has a version of OTP that satisfies the specified
%% required minimum OTP version and that includes OTP applications
%% with version different (e.g. greater) than the well known ones
%% (e.g. because of a new OTP version with a higher-versioned OTP
%% application e.g. `mnesia`), then the patched OTP modules are not
%% built (!) though the explicit copying in the `relx` overlay fails.
%% Addressing such a failure consists of updating the content of
%% `otp_patches/`.
{minimum_otp_vsn, "20.1"}.
{erl_opts, [debug_info, {parse_transform, lager_transform},
{lager_extra_sinks, [epoch_mining, epoch_pow_cuckoo,
epoch_metrics]}]}.
{deps, [{lager, ".*", {git, "https://github.com/aeternity/lager.git", {tag,"3.6.0.ae1"}}},
{setup, "2.0.2"},
{parse_trans, "3.2.0"},
{mnesia_rocksdb, ".*", {git, "https://github.com/aeternity/mnesia_rocksdb.git", {ref,"618870f"}}},
{enacl, ".*", {git, "https://github.com/jlouis/enacl.git", {ref, "c8403ab"}}},
{cowboy, "1.0.4", {git, "https://github.com/ninenines/cowboy.git", {tag, "1.0.4"}}},
{jsx, {git, "https://github.com/talentdeficit/jsx.git", {tag, "2.8.0"}}},
{jesse, {git, "https://github.com/aeternity/jesse.git", {ref, "4640ad1"}}}, %% Tag `1.5.0-rc2` with workaround for unexported `http_uri:uri()` type.
{gproc, "0.6.1"},
{jobs, "0.7.1"},
{exometer_core, {git, "https://github.com/Feuerlabs/exometer_core.git", {ref, "f088de5"}}},
{poolboy, "1.5.1"},
{yamerl, "0.5.0"},
{msgpack, "0.7.0"},
{base58, {git, "https://github.com/aeternity/erl-base58.git", {ref,"7f6e917"}}},
{eper, ".*", {git, "git://github.com/massemanet/eper.git", {tag, "0.97.6"}}},
{erlexec, ".*", {git, "https://github.com/saleyn/erlexec.git", {ref, "97a5188"}}},
{sha3, {git, "https://github.com/szktty/erlang-sha3", {ref, "dbdfd12"}}},
{sext, {git, "https://github.com/uwiger/sext.git", {ref, "615eebc"}}},
{idna, {git, "https://github.com/aeternity/erlang-idna", {ref, "24bf647"}}}
]}.
{plugins, [{swagger_endpoints, {git, "https://github.com/aeternity/swagger_endpoints", {tag, "v0.2.0"}}}]}.
{swagger_endpoints, [{src, "config/swagger.yaml"}, {dst, "apps/aeutils/src/endpoints.erl"}]}.
{relx, [{release, { epoch, "version value comes from VERSION" },
[runtime_tools, lager, setup, sext, rocksdb, mnesia_rocksdb, gproc,
jobs, {mnesia, load}, exometer_core, aecore, aehttp, enacl,
aebytecode, aevm, aering]},
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"},
{dev_mode, true},
{include_erts, false},
{overlay, [{copy, "REVISION", "REVISION"},
{copy, "VERSION" , "VERSION"},
{copy, "docs/installation.md" , "docs/installation.md"},
{copy, "docs/configuration.md" , "docs/configuration.md"},
{copy, "docs/operation.md" , "docs/operation.md"},
{copy, "docs/release-notes" , "docs/release-notes"},
{mkdir, "data/aecore/.genesis"},
{copy, "data/aecore/.genesis/accounts.json", "data/aecore/.genesis/accounts.json"},
{copy, "hooks/pre_start.sh", "bin/hooks/pre_start.sh"},
{copy, "apps/check_config/priv/extensions/check_config.sh", "bin/extensions/check_config"},
{copy, "apps/aeutils/test/data/epoch_testnet.yaml", "docs/examples/epoch_testnet.yaml"},
{copy, "otp_patches/ebin/mnesia.beam" , "patches/ebin/mnesia.beam" },
{copy, "otp_patches/ebin/mnesia_index.beam" , "patches/ebin/mnesia_index.beam" }
]},
{extended_start_script, true},
{extended_start_script_hooks, [
{pre_start, [{custom, "hooks/pre_start.sh"}]}
]},
{extended_start_script_extensions, [
{check_config, "extensions/check_config"}
]}]
}.
{profiles, [{local, [{relx, [{dev_mode, true},
{include_erts, false},
{include_src, true}]}]
},
{dev1, [{relx, [{dev_mode, false},
{include_erts, false},
{sys_config, "./config/dev1/sys.config"},
{vm_args, "./config/dev1/vm.args"},
{overlay, [{mkdir, "{{output_dir}}/data"},
{copy,
"_build/dev1/bin/check_config",
"{{output_dir}}/bin/check_config"},
{copy,
"_build/dev1/lib/aeutils/priv/epoch_config_schema.json",
"{{output_dir}}/data/epoch_config_schema.json"}]}
]}
]
},
{test, [{relx, [{dev_mode, true},
{include_erts, false},
{include_src, true},
{sys_config, "./config/dev1/sys.config"},
{vm_args, "./config/dev1/vm.args"}]},
{dist_node, [{setcookie, 'epoch_cookie'},
{sname, 'epoch_ct@localhost'}]},
{deps, [{meck, ".*", {git, "git://github.com/eproxus/meck.git", {tag, "0.8.6"}}},
{websocket_client, ".*", {git,
"git://github.com/aeternity/websocket_client",
{ref, "e88797c"}}}
]}
]},
{prod, [{relx, [{dev_mode, false},
{include_erts, true},
{include_src, false},
{overlay, [{copy,
"_build/prod/bin/check_config",
"bin/check_config"},
{copy,
"_build/prod/lib/aeutils/priv/epoch_config_schema.json",
"data/epoch_config_schema.json"}]}
]}
]}
]
}.
{escript_main_app, check_config}.
{escript_name, "check_config"}.
{escript_incl_apps, [aeutils, jsx, yamerl, jesse, rfc3339]}.
{escript_shebang, "#!/usr/bin/env escript\n"}.
{escript_comment, "%%\n"}.
{overrides, [{override, exometer_core,
[{erl_opts, [{d,'HUT_LAGER'},
{parse_transform, lager_transform},
debug_info,
fail_on_warning,
{platform_define, "^((1[8|9])|2)", rand_module},
{verbosity, trace}]}]}]}.
{provider_hooks,
[{post, [{compile, escriptize}]}]}.
{pre_hooks, [{"(linux|darwin|solaris|netbsd|freebsd)", compile,
"git rev-parse HEAD > ${REBAR_ROOT_DIR}/REVISION"},
{compile, "make -C ./otp_patches all"},
{compile, "./rebar3 swagger_endpoints"},
{compile, "erlc test/ct_eunit_xform.erl"} %% {ct_first_files, _} does not work
]}.
{post_hooks, [{"(linux|darwin|solaris|netbsd|freebsd)", compile, "rm ct_eunit_xform.beam"},
{clean, "make -C ./otp_patches clean"},
{"(linux|darwin|solaris|netbsd|freebsd)", clean, "rm ${REBAR_ROOT_DIR}/REVISION"}
]}.
{overrides, [{override, sha3, [{pre_hooks, [{"(linux|darwin)", compile, "make "},
{"(linux|darwin)", release, "make "},
{"(linux|darwin)", eunit, "make "}]}
]}
]}.
{ct_opts, [
{ct_hooks, [{cth_surefire, [{path, "../junit.xml"}]}]}
]}.
{dialyzer, [
{warnings, [unknown]},
{plt_apps, all_deps},
{base_plt_apps, [erts, kernel, stdlib, crypto, mnesia]}
]}.