diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-11-05 20:08:48 +0100 |
---|---|---|
committer | Jared Morrow <jared@basho.com> | 2014-03-11 21:11:36 +0000 |
commit | 77a0eb6fe4dca909c6fe63f00b6793ba759f1a63 (patch) | |
tree | 865da21cd27a7c2c765c02a28aaee42eeaf5aa4f /src/rebar_config.erl | |
parent | 195d61a4021f5df5604a584f04ed5fbe80cafde7 (diff) | |
download | rebar-77a0eb6fe4dca909c6fe63f00b6793ba759f1a63.tar.gz |
Fix #56 (always-on recursion)
Always-on recursive application of all rebar commands causes too many
issues. Recursive application is required for:
1. dealing with dependencies: get-deps, update-deps, and compile of deps
right after get-deps or update-deps
2. projects with a riak-like apps/ project structure and dev process
The vast majority of projects are not structured like riak. Therefore,
moving forward it's best to (by default) restrict recursive behavior to
dealing with deps. This commit does that and also adds command line and
rebar.config options for controlling or configuring recursion. Also, we
introduce two meta commands: prepare-deps (equivalent to rebar -r
get-deps compile) and refresh-deps (equivalent to rebar -r update-deps
compile). riak-like projects can extend the list of recursive commands
(to include 'eunit' and 'compile') by adding
{recursive_cmds, [eunit, compile]} to rebar.config.
Diffstat (limited to 'src/rebar_config.erl')
-rw-r--r-- | src/rebar_config.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rebar_config.erl b/src/rebar_config.erl index 9b58d4f..10c6483 100644 --- a/src/rebar_config.erl +++ b/src/rebar_config.erl @@ -31,6 +31,7 @@ get_all/2, set/3, set_global/3, get_global/3, + is_recursive/1, save_env/3, get_env/2, reset_envs/1, set_skip_dir/2, is_skip_dir/2, reset_skip_dirs/1, clean_config/2, @@ -109,6 +110,9 @@ get_global(Config, Key, Default) -> Value end. +is_recursive(Config) -> + get_xconf(Config, recursive, false). + consult_file(File) -> case filename:extension(File) of ".script" -> |