summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2012-06-04 08:46:17 -0600
committerDave Smith <dizzyd@dizzyd.com>2012-06-04 08:46:17 -0600
commit0f24d9325659742da8b829fbd5b82ba0cec169da (patch)
tree2eb54bd1a88492acb462cd1553ad643891cecb15
parentc13889618d0ad921e4e6ab07a0aae1560e8ac988 (diff)
Move to major.minor.patch release version; add OTP build version
version info
-rwxr-xr-xbootstrap6
-rw-r--r--ebin/rebar.app2
-rw-r--r--src/rebar.erl8
3 files changed, 12 insertions, 4 deletions
diff --git a/bootstrap b/bootstrap
index e86ad8e..c8a40de 100755
--- a/bootstrap
+++ b/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 ->
diff --git a/ebin/rebar.app b/ebin/rebar.app
index 0c6e4c3..5689b35 100644
--- a/ebin/rebar.app
+++ b/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,
diff --git a/src/rebar.erl b/src/rebar.erl
index 1f72a4c..4c1d20d 100644
--- a/src/rebar.erl
+++ b/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]).
%%