From 4b8c81fb53e2caaa74a33d5b62664a67427a7bbf Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sat, 10 Nov 2012 21:59:19 +0100 Subject: Implement 'rebar help CMD1 CMD2' and extend common 'rebar help' msg * allow plugins to print help message for implemented commands * append core rebar.config options to common 'rebar help' message --- src/rebar_otp_app.erl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/rebar_otp_app.erl') diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index a62f584..6c52336 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -29,6 +29,9 @@ -export([compile/2, clean/2]). +%% for internal use only +-export([info/2]). + -include("rebar.hrl"). %% =================================================================== @@ -82,11 +85,26 @@ clean(_Config, File) -> ok end. - %% =================================================================== %% Internal functions %% =================================================================== +info(help, compile) -> + info_help("Validate .app file"); +info(help, clean) -> + info_help("Delete .app file if generated from .app.src"). + +info_help(Description) -> + ?CONSOLE( + "~s.~n" + "~n" + "Valid rebar.config options:~n" + " ~p~n", + [ + Description, + {validate_app_modules, true} + ]). + preprocess(Config, AppSrcFile) -> case rebar_app_utils:load_app_file(Config, AppSrcFile) of {ok, Config1, AppName, AppData} -> -- cgit v1.1