diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2009-12-17 07:26:54 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2009-12-17 07:26:54 -0700 |
commit | f02c48a9097bd2278aad065d9434be91d1c7c06b (patch) | |
tree | 41f777fde72ecfa1884492b08bdf9800b8754ea8 | |
parent | ee0c6ad086d348873fa7851d72d1281c7ed4a510 (diff) |
Adding simple checks for necessary version of ERTS + Reltool
-rw-r--r-- | src/rebar.erl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 0e92731..1e44293 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -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; |