summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-06-22 13:47:06 -0600
committerDave Smith <dizzyd@dizzyd.com>2010-06-22 13:47:06 -0600
commit02bc52fc6aaca0ddb66dbe9e586df10ac82c6bce (patch)
tree76f98cf79eba9904626e78d273942a8280f6da55 /src
parent518d30d7ad4205f88951493905f81dfc6fe02b13 (diff)
Add support for embedding VCS info into the version data
Diffstat (limited to 'src')
-rw-r--r--src/rebar_core.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index ec568f9..e9c37de 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -38,6 +38,10 @@
-define(BUILD_TIME, "undefined").
-endif.
+-ifndef(VCS_INFO).
+-define(VCS_INFO, "undefined").
+-endif.
+
%% ===================================================================
%% Public API
%% ===================================================================
@@ -231,7 +235,7 @@ version Show version information
%%
version() ->
{ok, Vsn} = application:get_key(rebar, vsn),
- ?CONSOLE("Version ~s built ~s\n", [Vsn, ?BUILD_TIME]).
+ ?CONSOLE("rebar version: ~s date: ~s vcs: ~s\n", [Vsn, ?BUILD_TIME, ?VCS_INFO]).
%%
%% options accepted via getopt