summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rebar.config2
-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
5 files changed, 14 insertions, 15 deletions
diff --git a/rebar.config b/rebar.config
index a9b667e..2903832 100644
--- a/rebar.config
+++ b/rebar.config
@@ -23,7 +23,7 @@
{branch, "master"}}},
{providers, "",
{git, "https://github.com/tsloughter/providers.git",
- {branch, "master"}}},
+ {branch, "profiles"}}},
{erlydtl, ".*",
{git, "https://github.com/erlydtl/erlydtl.git",
{tag, "0.9.4"}}},
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}}.
-