aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2018-01-15 12:31:47 +0100
committerPaweł Chmielowski <pchmielowski@process-one.net>2018-01-15 12:31:47 +0100
commita7639fd4ad459aad5ad2d8fbe3b8c9414e5d4350 (patch)
treecc0569b477724af3e52a336778bcea8da96f33f7 /plugins
parentUse override syntax that rebar3 accepts (diff)
Call configure on deps in separate rebar command that compile
This way we rebar.config.script can use vars detected by configure
Diffstat (limited to 'plugins')
-rw-r--r--plugins/configure_deps.erl5
-rw-r--r--plugins/override_opts.erl6
2 files changed, 8 insertions, 3 deletions
diff --git a/plugins/configure_deps.erl b/plugins/configure_deps.erl
new file mode 100644
index 000000000..181da0b02
--- /dev/null
+++ b/plugins/configure_deps.erl
@@ -0,0 +1,5 @@
+-module(configure_deps).
+-export(['configure-deps'/2]).
+
+'configure-deps'(Config, Vals) ->
+ {ok, Config}.
diff --git a/plugins/override_opts.erl b/plugins/override_opts.erl
index df875c556..1d321fc87 100644
--- a/plugins/override_opts.erl
+++ b/plugins/override_opts.erl
@@ -2,13 +2,13 @@
-export([preprocess/2]).
override_opts(override, Config, Opts) ->
- lists:foldl(fun({Opt, [Value]}, Conf) ->
+ lists:foldl(fun({Opt, Value}, Conf) ->
rebar_config:set(Conf, Opt, Value)
end, Config, Opts);
override_opts(add, Config, Opts) ->
- lists:foldl(fun({Opt, [Value]}, Conf) ->
+ lists:foldl(fun({Opt, Value}, Conf) ->
V = rebar_config:get_local(Conf, Opt, []),
- rebar_config:set(Conf, Opt, [Value | V])
+ rebar_config:set(Conf, Opt, V ++ Value)
end, Config, Opts).
preprocess(Config, _Dirs) ->