summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-01-11 10:21:18 -0600
committerTristan Sloughter <t@crashfast.com>2015-01-11 10:22:00 -0600
commit407362c074ffbc280443e35ed95f4eb2abce0a78 (patch)
tree4b2b2f910f83be162e83c4c1a9761157592f7d4f /src
parent47269b1a8194e13a5a3de0f829cecaef85bf8419 (diff)
replace single profile atom in providers with list of profiles
Diffstat (limited to 'src')
-rw-r--r--src/rebar_app_info.erl18
-rw-r--r--src/rebar_core.erl4
-rw-r--r--src/rebar_prv_common_test.erl2
-rw-r--r--src/rebar_prv_eunit.erl3
4 files changed, 13 insertions, 14 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl
index 4fdb14c..ce23c22 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -20,8 +20,8 @@
ebin_dir/1,
applications/1,
applications/2,
- profile/1,
- profile/2,
+ profiles/1,
+ profiles/2,
deps/1,
deps/2,
dep_level/1,
@@ -45,7 +45,7 @@
app_details=[] :: list(),
applications=[] :: list(),
deps=[] :: list(),
- profile=default :: atom(),
+ profiles=[default] :: atom(),
dep_level=0 :: integer(),
dir :: file:name(),
source :: string() | tuple() | undefined,
@@ -172,13 +172,13 @@ applications(#app_info_t{applications=Applications}) ->
applications(AppInfo=#app_info_t{}, Applications) ->
AppInfo#app_info_t{applications=Applications}.
--spec profile(t()) -> list().
-profile(#app_info_t{profile=Profile}) ->
- Profile.
+-spec profiles(t()) -> list().
+profiles(#app_info_t{profiles=Profiles}) ->
+ Profiles.
--spec profile(t(), list()) -> t().
-profile(AppInfo=#app_info_t{}, Profile) ->
- AppInfo#app_info_t{profile=Profile}.
+-spec profiles(t(), list()) -> t().
+profiles(AppInfo=#app_info_t{}, Profiles) ->
+ AppInfo#app_info_t{profiles=Profiles}.
-spec deps(t()) -> list().
deps(#app_info_t{deps=Deps}) ->
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index c3a8951..9d9262c 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -77,8 +77,8 @@ process_command(State, Command) ->
Command when Command =:= do; Command =:= as ->
do(TargetProviders, State);
_ ->
- Profile = providers:profile(CommandProvider),
- State1 = rebar_state:apply_profiles(State, [Profile]),
+ Profiles = providers:profiles(CommandProvider),
+ State1 = rebar_state:apply_profiles(State, Profiles),
Opts = providers:opts(CommandProvider)++rebar3:global_option_spec_list(),
case getopt:parse(Opts, rebar_state:command_args(State1)) of
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index f17134a..608b342 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -28,7 +28,7 @@ init(State) ->
{short_desc, "Run Common Tests."},
{desc, ""},
{opts, ct_opts(State)},
- {profile, test}]),
+ {profiles, [test]}]),
State1 = rebar_state:add_provider(State, Provider),
{ok, State1}.
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl
index 3bd20fd..bb0fd9d 100644
--- a/src/rebar_prv_eunit.erl
+++ b/src/rebar_prv_eunit.erl
@@ -28,7 +28,7 @@ init(State) ->
{short_desc, "Run EUnit Tests."},
{desc, ""},
{opts, eunit_opts(State)},
- {profile, test}]),
+ {profiles, [test]}]),
State1 = rebar_state:add_provider(State, Provider),
{ok, State1}.
@@ -185,4 +185,3 @@ handle_results(error) ->
{error, unknown_error};
handle_results({error, Reason}) ->
{error, {error_running_tests, Reason}}.
-