瀏覽代碼

Move to major.minor.patch release version; add OTP build version

version info
pull/3/head
Dave Smith 13 年之前
父節點
當前提交
0f24d93256
共有 3 個文件被更改,包括 12 次插入4 次删除
  1. +5
    -1
      bootstrap
  2. +1
    -1
      ebin/rebar.app
  3. +6
    -2
      src/rebar.erl

+ 5
- 1
bootstrap 查看文件

@ -24,12 +24,16 @@ main(Args) ->
false -> undefined
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
case make:files(filelib:wildcard("src/*.erl"),
[{outdir, "ebin"}, {i, "include"},
DebugFlag,
{d, 'BUILD_TIME', Built},
{d, 'VCS_INFO', VcsInfo}]) of
{d, 'VCS_INFO', VcsInfo},
{d, 'OTP_INFO', OtpInfo}]) of
up_to_date ->
ok;
error ->

+ 1
- 1
ebin/rebar.app 查看文件

@ -3,7 +3,7 @@
{application, rebar,
[{description, "Rebar: Erlang Build Tool"},
{vsn, "2"},
{vsn, "2.0.0"},
{modules, [ rebar,
rebar_abnfc_compiler,
rebar_appups,

+ 6
- 2
src/rebar.erl 查看文件

@ -41,6 +41,10 @@
-define(VCS_INFO, "undefined").
-endif.
-ifndef(OTP_INFO).
-define(OTP_INFO, "undefined").
-endif.
%% ====================================================================
%% Public API
%% ====================================================================
@ -202,8 +206,8 @@ set_log_level(Options) ->
%%
version() ->
{ok, Vsn} = application:get_key(rebar, vsn),
?CONSOLE("rebar version: ~s date: ~s vcs: ~s\n",
[Vsn, ?BUILD_TIME, ?VCS_INFO]).
?CONSOLE("rebar ~s ~s ~s ~s\n",
[Vsn, ?OTP_INFO, ?BUILD_TIME, ?VCS_INFO]).
%%

Loading…
取消
儲存