mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Restore old reltool vsn check
reltool is missing an app resource file before R14A. Therefore, restore the old check and add TODO.
This commit is contained in:
parent
86c69bc253
commit
3c56fbab6f
1 changed files with 15 additions and 14 deletions
|
@ -81,20 +81,21 @@ clean(Config, ReltoolFile) ->
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
|
|
||||||
check_vsn() ->
|
check_vsn() ->
|
||||||
_ = application:load(reltool),
|
%% TODO: use application:load and application:get_key once we require
|
||||||
ReltoolVsn =
|
%% R14A or newer. There's no reltool.app before R14A.
|
||||||
case lists:keysearch(reltool, 1, application:loaded_applications()) of
|
case code:lib_dir(reltool) of
|
||||||
{value, {_, _, V}} ->
|
{error, bad_name} ->
|
||||||
V;
|
?ABORT("Reltool support requires the reltool application "
|
||||||
_ ->
|
"to be installed!", []);
|
||||||
""
|
Path ->
|
||||||
end,
|
ReltoolVsn = filename:basename(Path),
|
||||||
case ReltoolVsn < "0.5.2" of
|
case ReltoolVsn < "reltool-0.5.2" of
|
||||||
true ->
|
true ->
|
||||||
?ABORT("Reltool support requires at least reltool-0.5.2; "
|
?ABORT("Reltool support requires at least reltool-0.5.2; "
|
||||||
"this VM is using ~s\n", [ReltoolVsn]);
|
"this VM is using ~s\n", [ReltoolVsn]);
|
||||||
false ->
|
false ->
|
||||||
ok
|
ok
|
||||||
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
process_overlay(ReltoolConfig) ->
|
process_overlay(ReltoolConfig) ->
|
||||||
|
|
Loading…
Reference in a new issue