summaryrefslogtreecommitdiff
path: root/src/rebar_core.erl
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2009-12-12 07:43:12 -0700
committerDave Smith <dizzyd@dizzyd.com>2009-12-12 07:43:12 -0700
commit5618198eeb924b225e39f91d793483d305a90cda (patch)
tree070d54be0bee84b9c11b9a6ab2abd788115935c1 /src/rebar_core.erl
parent3990f0a0766e5e508e319e73139df93cc4c3bde4 (diff)
parent9e618f79c5ff5a55418adbe3909b9490d7ccde91 (diff)
Merging mainline
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r--src/rebar_core.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index c76d738..373a7e8 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -30,11 +30,21 @@
-include("rebar.hrl").
+-ifndef(BUILD_TIME).
+-define(BUILD_TIME, "undefined").
+-endif.
+
%% ===================================================================
%% Public API
%% ===================================================================
-run(Args) ->
+run(["version"]) ->
+ %% Load application spec and display vsn and build time info
+ ok = application:load(rebar),
+ {ok, Vsn} = application:get_key(rebar, vsn),
+ ?CONSOLE("Version ~s built ~s\n", [Vsn, ?BUILD_TIME]),
+ ok;
+run(Args) ->
%% Filter all the flags (i.e. string of form key=value) from the
%% command line arguments. What's left will be the commands to run.
Commands = filter_flags(Args, []),
@@ -47,6 +57,9 @@ run(Args) ->
%% Pre-load the rebar app so that we get default configuration
ok = application:load(rebar),
+ %% Make sure crypto is running
+ crypto:start(),
+
%% Initialize logging system
rebar_log:init(),