소스 검색

WIP: Allow rebar2 when compiled correctly

pc-test
Paul J. Davis 3 년 전
부모
커밋
75cafb4166
2개의 변경된 파일10개의 추가작업 그리고 13개의 파일을 삭제
  1. +0
    -3
      rebar.config
  2. +10
    -10
      rebar.config.script

+ 0
- 3
rebar.config 파일 보기

@ -35,6 +35,3 @@
{eunit_opts, [ {eunit_opts, [
verbose verbose
]}. ]}.
{pre_hooks, [{"", compile, "escript enc compile"}]}.
{post_hooks, [{"", clean, "escript enc clean"}]}.

+ 10
- 10
rebar.config.script 파일 보기

@ -45,13 +45,16 @@ OTPVsn = case re:run(OTPRel, "R?(\\d+)", [{capture, all_but_first, list}]) of
nomatch -> erlang:error(unknown_otp_release) nomatch -> erlang:error(unknown_otp_release)
end, end,
case OTPVsn < 25 of
true ->
case {IsRebar3, OTPVsn} of
{false, _} ->
Config2; Config2;
false when IsRebar3 ->
Config3 = lists:keydelete(pre_hooks, 1, Config2),
Config4 = lists:keydelete(post_hooks, 1, Config3),
Config4 ++ [
{true, Vsn} when Vsn < 25 ->
Config2 ++ [
{pre_hooks, [{"", compile, "escript enc compile"}]},
{post_hooks, [{"", clean, "escript enc clean"}]}
];
{true, Vsn} when Vsn >= 25 ->
Config2 ++ [
{plugins, [{pc, "~> 1.0"}]}, {plugins, [{pc, "~> 1.0"}]},
{artifacts, ["priv/jiffy.so"]}, {artifacts, ["priv/jiffy.so"]},
{provider_hooks, [ {provider_hooks, [
@ -60,8 +63,5 @@ case OTPVsn < 25 of
{clean, {pc, clean}} {clean, {pc, clean}}
]} ]}
]} ]}
];
false ->
io:format("Rebar 2 is no longer supported as of Erlang 25.0~n", []),
halt(1)
]
end. end.

불러오는 중...
취소
저장