瀏覽代碼

Adding simple checks for necessary version of ERTS + Reltool

pull/3/head
Dave Smith 15 年之前
父節點
當前提交
f02c48a909
共有 1 個檔案被更改,包括 20 行新增0 行删除
  1. +20
    -0
      src/rebar.erl

+ 20
- 0
src/rebar.erl 查看文件

@ -27,6 +27,26 @@
-export([main/1]). -export([main/1]).
main(Args) -> 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 case catch(rebar_core:run(Args)) of
ok -> ok ->
ok; ok;

Loading…
取消
儲存