Pārlūkot izejas kodu

Restore old reltool vsn check

reltool is missing an app resource file before R14A.
Therefore, restore the old check and add TODO.
pull/3/head
Tuncer Ayaz pirms 13 gadiem
vecāks
revīzija
3c56fbab6f
1 mainītis faili ar 15 papildinājumiem un 14 dzēšanām
  1. +15
    -14
      src/rebar_reltool.erl

+ 15
- 14
src/rebar_reltool.erl Parādīt failu

@ -81,20 +81,21 @@ clean(Config, ReltoolFile) ->
%% =================================================================== %% ===================================================================
check_vsn() -> check_vsn() ->
_ = application:load(reltool),
ReltoolVsn =
case lists:keysearch(reltool, 1, application:loaded_applications()) of
{value, {_, _, V}} ->
V;
_ ->
""
end,
case ReltoolVsn < "0.5.2" of
true ->
?ABORT("Reltool support requires at least reltool-0.5.2; "
"this VM is using ~s\n", [ReltoolVsn]);
false ->
ok
%% TODO: use application:load and application:get_key once we require
%% R14A or newer. There's no reltool.app before R14A.
case code:lib_dir(reltool) of
{error, bad_name} ->
?ABORT("Reltool support requires the reltool application "
"to be installed!", []);
Path ->
ReltoolVsn = filename:basename(Path),
case ReltoolVsn < "reltool-0.5.2" of
true ->
?ABORT("Reltool support requires at least reltool-0.5.2; "
"this VM is using ~s\n", [ReltoolVsn]);
false ->
ok
end
end. end.
process_overlay(ReltoolConfig) -> process_overlay(ReltoolConfig) ->

Notiek ielāde…
Atcelt
Saglabāt