diff options
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 15 |
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(), |