-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrebar.config.script
More file actions
34 lines (33 loc) · 922 Bytes
/
rebar.config.script
File metadata and controls
34 lines (33 loc) · 922 Bytes
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
% Defines old_crypto_hash, old_crypto_block and old_types depending on OTP release
Release = case erlang:system_info(otp_release) of
"R" ++ Rel0 -> Rel0;
Rel1 -> Rel1
end,
Opts1 = case Release < "15B02" of
true -> [{d, old_crypto_hash}];
false -> []
end,
Opts2 = case Release < "16B01" of
true -> [{d, old_crypto_block}|Opts1];
false -> Opts1
end,
Opts3 = case Release < "17" of
true -> [{d, old_types}|Opts2];
false -> Opts2
end,
Opts4 = case os:getenv("TRAVIS") == "true" of
true -> [{d, is_travis}|Opts3];
false -> Opts3
end,
% io:format("ERLOPTS: ~p\n", [Opts4]),
case Opts4 of
[] ->
CONFIG;
_ ->
case lists:keysearch(erl_opts, 1, CONFIG) of
{value, {erl_opts, OldOpts}} ->
lists:keyreplace(erl_opts, 1, CONFIG, {erl_opts, OldOpts++Opts4});
false ->
CONFIG ++ [{erl_opts, Opts4}]
end
end.