mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Follow-up typo fixes for #327
This commit is contained in:
parent
17546788c0
commit
38934da869
2 changed files with 5 additions and 5 deletions
|
@ -384,15 +384,15 @@ otp_release1([$R,N|_]=Rel) when is_integer(N) ->
|
||||||
%% If OTP >= 17.x, erlang:system_info(otp_release) returns just the
|
%% If OTP >= 17.x, erlang:system_info(otp_release) returns just the
|
||||||
%% major version number, we have to read the full version from
|
%% major version number, we have to read the full version from
|
||||||
%% a file. See http://www.erlang.org/doc/system_principles/versions.html
|
%% a file. See http://www.erlang.org/doc/system_principles/versions.html
|
||||||
%% Read vsn strinf from the 'OTP_VERSION' file and return as list without
|
%% Read vsn string from the 'OTP_VERSION' file and return as list without
|
||||||
%% the "\n".
|
%% the "\n".
|
||||||
otp_release1(Rel) ->
|
otp_release1(Rel) ->
|
||||||
File = filename:join([code:root_dir(), "releases", Rel, "OTP_VERSION"]),
|
File = filename:join([code:root_dir(), "releases", Rel, "OTP_VERSION"]),
|
||||||
{ok, Vsn} = file:read_file(File),
|
{ok, Vsn} = file:read_file(File),
|
||||||
|
|
||||||
%% NOTE: It's fine to rely on the binary module here because we
|
%% It's fine to rely on the binary module here because we can
|
||||||
%% can be sure that it's available when the otp_release string
|
%% be sure that it's available when the otp_release string does
|
||||||
%% does not begin with $R.
|
%% not begin with $R.
|
||||||
Size = byte_size(Vsn),
|
Size = byte_size(Vsn),
|
||||||
%% The shortest vsn string consists of at least two digits
|
%% The shortest vsn string consists of at least two digits
|
||||||
%% followed by "\n". Therefore, it's safe to assume Size >= 3.
|
%% followed by "\n". Therefore, it's safe to assume Size >= 3.
|
||||||
|
|
|
@ -35,7 +35,7 @@ check_otp_release_test() ->
|
||||||
?assert(true);
|
?assert(true);
|
||||||
%% >= 17.x
|
%% >= 17.x
|
||||||
[N|_]=Rel when is_integer(N) ->
|
[N|_]=Rel when is_integer(N) ->
|
||||||
%% Check that it has at least Major.Minor
|
%% Check that it has at least Major.Minor.
|
||||||
?assert(length(string:tokens(Rel, ".")) > 1),
|
?assert(length(string:tokens(Rel, ".")) > 1),
|
||||||
|
|
||||||
%% If otp_patch_apply was used and the release version has
|
%% If otp_patch_apply was used and the release version has
|
||||||
|
|
Loading…
Reference in a new issue