aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric <[email protected]>2012-09-17 12:09:42 -0500
committerEric <[email protected]>2012-09-18 10:05:14 -0700
commit2596d9c8b8838f5b9bd381f7935000647a80d281 (patch)
tree851a7674786a85caf135b79c0adcef5ef4a03a34
parentd98c4fc0a9ecd28dc3ce50c250813736e7fc390a (diff)
downloadrelx-2596d9c8b8838f5b9bd381f7935000647a80d281.tar.gz
relx-2596d9c8b8838f5b9bd381f7935000647a80d281.tar.bz2
relx-2596d9c8b8838f5b9bd381f7935000647a80d281.zip
support undefined as valid default release types
-rw-r--r--src/rcl_state.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rcl_state.erl b/src/rcl_state.erl
index 72b0fc5..2dd0b14 100644
--- a/src/rcl_state.erl
+++ b/src/rcl_state.erl
@@ -92,7 +92,9 @@ new(PropList, Targets) when erlang:is_list(PropList) ->
goals=proplists:get_value(goals, PropList, []),
providers = [],
releases=ec_dictionary:new(ec_dict),
- config_values=ec_dictionary:new(ec_dict)},
+ config_values=ec_dictionary:new(ec_dict),
+ default_release={proplists:get_value(relname, PropList, undefined),
+ proplists:get_value(relvsn, PropList, undefined)}},
create_logic_providers(State0).
%% @doc get the current log state for the system
@@ -146,7 +148,8 @@ get_release(#state_t{releases=Releases}, Name, Vsn) ->
releases(#state_t{releases=Releases}) ->
Releases.
--spec default_release(t()) -> {rcl_release:name(), rcl_release:vsn()}.
+-spec default_release(t()) ->
+ {rcl_release:name() | undefined, rcl_release:vsn() | undefined}.
default_release(#state_t{default_release=Def}) ->
Def.