mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Move to major.minor.patch release version; add OTP build version
version info
This commit is contained in:
parent
c13889618d
commit
0f24d93256
3 changed files with 12 additions and 4 deletions
|
@ -24,12 +24,16 @@ main(Args) ->
|
||||||
false -> undefined
|
false -> undefined
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
%% Extract the system info of the version of OTP we use to compile rebar
|
||||||
|
OtpInfo = string:strip(erlang:system_info(otp_release), both, $\n),
|
||||||
|
|
||||||
%% Compile all src/*.erl to ebin
|
%% Compile all src/*.erl to ebin
|
||||||
case make:files(filelib:wildcard("src/*.erl"),
|
case make:files(filelib:wildcard("src/*.erl"),
|
||||||
[{outdir, "ebin"}, {i, "include"},
|
[{outdir, "ebin"}, {i, "include"},
|
||||||
DebugFlag,
|
DebugFlag,
|
||||||
{d, 'BUILD_TIME', Built},
|
{d, 'BUILD_TIME', Built},
|
||||||
{d, 'VCS_INFO', VcsInfo}]) of
|
{d, 'VCS_INFO', VcsInfo},
|
||||||
|
{d, 'OTP_INFO', OtpInfo}]) of
|
||||||
up_to_date ->
|
up_to_date ->
|
||||||
ok;
|
ok;
|
||||||
error ->
|
error ->
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{application, rebar,
|
{application, rebar,
|
||||||
[{description, "Rebar: Erlang Build Tool"},
|
[{description, "Rebar: Erlang Build Tool"},
|
||||||
{vsn, "2"},
|
{vsn, "2.0.0"},
|
||||||
{modules, [ rebar,
|
{modules, [ rebar,
|
||||||
rebar_abnfc_compiler,
|
rebar_abnfc_compiler,
|
||||||
rebar_appups,
|
rebar_appups,
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
-define(VCS_INFO, "undefined").
|
-define(VCS_INFO, "undefined").
|
||||||
-endif.
|
-endif.
|
||||||
|
|
||||||
|
-ifndef(OTP_INFO).
|
||||||
|
-define(OTP_INFO, "undefined").
|
||||||
|
-endif.
|
||||||
|
|
||||||
%% ====================================================================
|
%% ====================================================================
|
||||||
%% Public API
|
%% Public API
|
||||||
%% ====================================================================
|
%% ====================================================================
|
||||||
|
@ -202,8 +206,8 @@ set_log_level(Options) ->
|
||||||
%%
|
%%
|
||||||
version() ->
|
version() ->
|
||||||
{ok, Vsn} = application:get_key(rebar, vsn),
|
{ok, Vsn} = application:get_key(rebar, vsn),
|
||||||
?CONSOLE("rebar version: ~s date: ~s vcs: ~s\n",
|
?CONSOLE("rebar ~s ~s ~s ~s\n",
|
||||||
[Vsn, ?BUILD_TIME, ?VCS_INFO]).
|
[Vsn, ?OTP_INFO, ?BUILD_TIME, ?VCS_INFO]).
|
||||||
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
Loading…
Reference in a new issue