summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-04-13 17:09:57 +0000
committerFred Hebert <mononcqc@ferd.ca>2015-04-13 17:09:57 +0000
commit8f1bfcb5965c3647d16f3c2fe596fc35d1f94e09 (patch)
treef315836614a2eb660836fda5c9f4e08312bc3a6b
parent293b415cb300f084e584ae7247c7024e826ce480 (diff)
Rename wtf->report, add all dep versions
-rw-r--r--src/rebar.app.src2
-rw-r--r--src/rebar3.erl4
-rw-r--r--src/rebar_prv_report.erl (renamed from src/rebar_prv_wtf.erl)16
3 files changed, 13 insertions, 9 deletions
diff --git a/src/rebar.app.src b/src/rebar.app.src
index 0fd3579..61f719b 100644
--- a/src/rebar.app.src
+++ b/src/rebar.app.src
@@ -46,12 +46,12 @@
rebar_prv_new,
rebar_prv_packages,
rebar_prv_release,
+ rebar_prv_report,
rebar_prv_shell,
rebar_prv_tar,
rebar_prv_update,
rebar_prv_upgrade,
rebar_prv_version,
- rebar_prv_wtf,
rebar_prv_xref]}
]}
]}.
diff --git a/src/rebar3.erl b/src/rebar3.erl
index 84eae05..460bc36 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -55,7 +55,7 @@ main(Args) ->
non_existing ->
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace", []),
?DEBUG("Uncaught error: ~p ~p", [Module, Reason]),
- ?INFO("When submitting a bug report, please include the output of `rebar3 wtf \"your command\"`", []);
+ ?INFO("When submitting a bug report, please include the output of `rebar3 report \"your command\"`", []);
_ ->
?ERROR(Module:format_error(Reason), [])
end,
@@ -68,7 +68,7 @@ main(Args) ->
%% Dump this error to console
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace", []),
?DEBUG("Uncaught error: ~p", [Error]),
- ?INFO("When submitting a bug report, please include the output of `rebar3 wtf \"your command\"`", []),
+ ?INFO("When submitting a bug report, please include the output of `rebar3 report \"your command\"`", []),
erlang:halt(1)
end.
diff --git a/src/rebar_prv_wtf.erl b/src/rebar_prv_report.erl
index 9be9a4b..45bc0b0 100644
--- a/src/rebar_prv_wtf.erl
+++ b/src/rebar_prv_report.erl
@@ -1,7 +1,7 @@
%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
--module(rebar_prv_wtf).
+-module(rebar_prv_report).
-behaviour(provider).
@@ -11,7 +11,7 @@
-include("rebar.hrl").
--define(PROVIDER, wtf).
+-define(PROVIDER, report).
-define(DEPS, []).
-define(ISSUES_URL, "https://github.com/rebar/rebar3/issues").
@@ -25,7 +25,7 @@ init(State) ->
{module, ?MODULE},
{bare, false},
{deps, ?DEPS},
- {example, "rebar3 wtf \"<task>\""},
+ {example, "rebar3 report \"<task>\""},
{short_desc, "Provide a crash report to be sent to the rebar3 issues page."},
{desc, "Provide a crash report to be sent to the rebar3 issues page."},
{opts, [
@@ -42,7 +42,11 @@ do(State) ->
%% ...
%% Show app versions (including rebar3)
{ok, Vsn} = application:get_key(rebar, vsn),
- Vsns = application:which_applications(),
+ {ok, Apps} = application:get_key(rebar, applications),
+ [application:ensure_started(App) || App <- Apps],
+ Vsns = [io_lib:format("~p: ~s~n", [App, AVsn])
+ || App <- lists:sort(Apps),
+ {ok, AVsn} <- [application:get_key(App, vsn)]],
%% Show OS and versions
OS = erlang:system_info(system_architecture),
%% Erlang version (ERTS)
@@ -54,7 +58,7 @@ do(State) ->
UTC = calendar:universal_time(),
%%
?CONSOLE(
- "Rebar3 wtf report~n"
+ "Rebar3 report~n"
" version ~s~n"
" generated at ~s~n"
"=================~n"
@@ -71,7 +75,7 @@ do(State) ->
"Library directory: ~ts~n"
"-----------------~n"
"Loaded Applications:~n"
- "~p~n"
+ "~s~n"
"-----------------~n"
"Escript path: ~ts~n"
"Providers:~n"