summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-12-06 17:47:41 -0600
committerTristan Sloughter <t@crashfast.com>2014-12-06 20:08:36 -0600
commitf77cbb7f508345c1352b957d75e0e350725f707c (patch)
tree46d15724ae9f3e85abccaabfe5fb8fd1d2e3cc2e
parent2da9be88802e83a6cd577af6c3f1c1c804d3eadb (diff)
don't lose defualt deps when creating current profile
-rw-r--r--src/rebar_prv_install_deps.erl2
-rw-r--r--src/rebar_prv_tar.erl2
-rw-r--r--src/rebar_state.erl5
3 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 692beaf..20e7808 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -70,6 +70,8 @@ do(State) ->
ProjectApps = rebar_state:project_apps(State),
try
{ok, SrcApps, State1} = case {Profile, rebar_state:get(State, locks, [])} of
+ {default, []} ->
+ handle_deps(State, rebar_state:get(State, {deps, Profile}, []));
{default, Locks} ->
handle_deps(State, Locks);
_ ->
diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl
index 40a84e3..0225e19 100644
--- a/src/rebar_prv_tar.erl
+++ b/src/rebar_prv_tar.erl
@@ -12,7 +12,7 @@
-include("rebar.hrl").
-define(PROVIDER, tar).
--define(DEPS, [compile]).
+-define(DEPS, [{compile, default}, compile]).
%% ===================================================================
%% Public API
diff --git a/src/rebar_state.erl b/src/rebar_state.erl
index 7cdfd9a..b412c27 100644
--- a/src/rebar_state.erl
+++ b/src/rebar_state.erl
@@ -152,6 +152,10 @@ command_parsed_args(State, CmdArgs) ->
State#state_t{command_parsed_args=CmdArgs}.
%% Only apply profiles to the default profile
+apply_profile(State=#state_t{default=Opts}, default) ->
+ Deps = rebar_state:get(State, deps, []),
+ Opts1 = dict:store({deps, default}, Deps, Opts),
+ State#state_t{opts=Opts1};
apply_profile(State=#state_t{default=Opts}, Profile) ->
ConfigProfiles = rebar_state:get(State, profiles, []),
Deps = rebar_state:get(State, deps, []),
@@ -172,6 +176,7 @@ merge_opts(Profile, NewOpts, OldOpts) ->
(_Key, NewValue, _OldValue) ->
NewValue
end, NewOpts, OldOpts),
+
case dict:find(deps, NewOpts) of
error ->
dict:store({deps, Profile}, [], Dict);