Packages
locus
2.3.4
2.3.15
2.3.14
2.3.13
2.3.12
2.3.11
2.3.10
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
retired
2.3.2
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.1.0
2.0.0
1.16.1
1.16.0
1.15.0
1.14.1
1.14.0
1.13.2
1.13.1
1.13.0
1.12.2
1.12.1
1.12.0
1.11.0
1.11.0-beta
1.10.2
1.10.1
1.10.0
1.9.0
1.9.0-beta
1.8.0
1.7.0
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
MMDB reader for geolocation and ASN lookup of IP addresses, supporting MaxMind GeoLite2/GeoIP2 and other providers
Current section
Files
Jump to
Current section
Files
rebar.config.script
% vim: set ft=erlang:
begin
TakeOutHank
= fun (Config) ->
{project_plugins, ProjPlugins}
= lists:keyfind(project_plugins, 1, Config),
{value, {rebar3_hank, HankVersion}, RemainingProjPlugins}
= lists:keytake(rebar3_hank, 1, ProjPlugins),
_UpdatedConfig
= lists:keystore(project_plugins, 1, Config,
{project_plugins, RemainingProjPlugins})
end,
TakeOutHankIfMaybeExprNotEnabledOnEnv
= fun (Config) ->
Env = os:getenv(),
case [V || "ERL_FLAGS=" ++ V <- Env] of
[Flags | _] ->
% katana-code (a dependent of rebar3_hank) requires maybe_expr
case string:find(Flags, "-enable-feature maybe_expr") of
nomatch ->
TakeOutHank(Config);
_ ->
Config
end;
[] ->
TakeOutHank(Config)
end
end,
OtpRelease = erlang:system_info(otp_release),
try list_to_integer(OtpRelease) of
22 ->
% Take rebar3_hank away as it's no longer compatible with OTP 22
TakeOutHank(CONFIG) ;
25 ->
TakeOutHankIfMaybeExprNotEnabledOnEnv(CONFIG);
_ ->
CONFIG
catch
error:badarg ->
logger:warning("Don't now how to compare to OTP release: ~tp", [OtpRelease]),
CONFIG
end
end.