summaryrefslogtreecommitdiff
path: root/src/rebar.erl
diff options
context:
space:
mode:
authorJared Morrow <jared@basho.com>2014-03-11 21:26:15 +0000
committerJared Morrow <jared@basho.com>2014-03-11 21:26:15 +0000
commit47c089aa806653d826b8bc5f4b8dc29724af1da7 (patch)
treee8de872fa1f72bad757e1f02a7fee23e136d481a /src/rebar.erl
parentfa1a2b53fd66ae833586729a2122a31ac1f29b0b (diff)
parent415d872730daf58a91b6fbd6d3eac1f015cb9c24 (diff)
downloadrebar-47c089aa806653d826b8bc5f4b8dc29724af1da7.tar.gz
Merge branch 'tuncer-auto-recursion'
Diffstat (limited to 'src/rebar.erl')
-rw-r--r--src/rebar.erl27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/rebar.erl b/src/rebar.erl
index 36a7b36..618cce8 100644
--- a/src/rebar.erl
+++ b/src/rebar.erl
@@ -206,8 +206,10 @@ help() ->
" ~p~n"
" ~p~n"
" ~p~n"
+ " ~p~n"
" ~p~n",
[
+ {recursive_cmds, []},
{lib_dirs, []},
{sub_dirs, ["dir1", "dir2"]},
{plugins, [plugin1, plugin2]},
@@ -254,19 +256,23 @@ save_options(Config, {Options, NonOptArgs}) ->
Config3 = rebar_config:set_xconf(Config2, keep_going,
proplists:get_bool(keep_going, Options)),
+ %% Setup flag to enable recursive application of commands
+ Config4 = rebar_config:set_xconf(Config3, recursive,
+ proplists:get_bool(recursive, Options)),
+
%% Set global variables based on getopt options
- Config4 = set_global_flag(Config3, Options, force),
- Config5 = case proplists:get_value(jobs, Options, ?DEFAULT_JOBS) of
+ Config5 = set_global_flag(Config4, Options, force),
+ Config6 = case proplists:get_value(jobs, Options, ?DEFAULT_JOBS) of
?DEFAULT_JOBS ->
- Config4;
+ Config5;
Jobs ->
- rebar_config:set_global(Config4, jobs, Jobs)
+ rebar_config:set_global(Config5, jobs, Jobs)
end,
%% Filter all the flags (i.e. strings of form key=value) from the
%% command line arguments. What's left will be the commands to run.
- {Config6, RawCmds} = filter_flags(Config5, NonOptArgs, []),
- {Config6, unabbreviate_command_names(RawCmds)}.
+ {Config7, RawCmds} = filter_flags(Config6, NonOptArgs, []),
+ {Config7, unabbreviate_command_names(RawCmds)}.
%%
%% set log level based on getopt option
@@ -358,6 +364,9 @@ list-templates List available templates
doc Generate Erlang program documentation
+prepare-deps Run 'rebar -r get-deps compile'
+refresh-deps Run 'rebar -r update-deps compile'
+
check-deps Display to be fetched dependencies
get-deps Fetch dependencies
update-deps Update fetched dependencies
@@ -420,7 +429,9 @@ option_spec_list() ->
{config, $C, "config", string, "Rebar config file to use"},
{profile, $p, "profile", undefined, "Profile this run of rebar"},
{keep_going, $k, "keep-going", undefined,
- "Keep running after a command fails"}
+ "Keep running after a command fails"},
+ {recursive, $r, "recursive", boolean,
+ "Apply commands to subdirs and dependencies"}
].
%%
@@ -469,7 +480,9 @@ command_names() ->
"help",
"list-deps",
"list-templates",
+ "prepare-deps",
"qc",
+ "refresh-deps",
"update-deps",
"overlay",
"shell",