mirror of
https://github.com/correl/rebar.git
synced 2024-11-14 19:19:30 +00:00
Adding simple checks for necessary version of ERTS + Reltool
This commit is contained in:
parent
ee0c6ad086
commit
f02c48a909
1 changed files with 20 additions and 0 deletions
|
@ -27,6 +27,26 @@
|
|||
-export([main/1]).
|
||||
|
||||
main(Args) ->
|
||||
%% HACK: Make sure the caller is running w/ r13b03 and reltool >= 0.5.2
|
||||
case erlang:system_info(version) < "5.7.4" of
|
||||
true ->
|
||||
io:format("Rebar requires at least erts 5.7.4; this VM is using ~s\n",
|
||||
[erlang:system_info(version)]),
|
||||
halt(1);
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
|
||||
ReltoolVsn = filename:basename(code:lib_dir(reltool)),
|
||||
case ReltoolVsn < "reltool-0.5.2" of
|
||||
true ->
|
||||
io:format("Rebar requires at least reltool-0.5.2; this VM is using ~s\n",
|
||||
[ReltoolVsn]),
|
||||
halt(1);
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
|
||||
case catch(rebar_core:run(Args)) of
|
||||
ok ->
|
||||
ok;
|
||||
|
|
Loading…
Reference in a new issue