diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2009-12-07 16:03:56 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2009-12-07 16:03:56 -0700 |
commit | ffa0cda467ce851ff57aa23b92ab8f3fd679fb33 (patch) | |
tree | bb7617149d8c3d73b33c4864157a233d0fd63cf8 /src | |
parent | 95d52f860df1be7d2df5d7fce0c499ec4832add9 (diff) |
Updating bootstrap to embed the build time into a macro that we can pull via "version" command
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 7a40200..d39a425 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -28,11 +28,22 @@ -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) -> + ?CONSOLE("Args: ~p\n", [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, []), |