diff options
author | Jordan Wilberding <[email protected]> | 2013-04-04 09:49:09 -0700 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2013-04-04 09:49:09 -0700 |
commit | a5f9b6c2bea4dc4bc7b60198860f5d8fc978ec8a (patch) | |
tree | 32f11cec4aeb032900dfae55b93a5445cb93dc69 /src/rcl_state.erl | |
parent | b7d37501383072a7795298979b097a7066a48224 (diff) | |
parent | aa660847217d25f477c7b396a8e752783beb26d3 (diff) | |
download | relx-a5f9b6c2bea4dc4bc7b60198860f5d8fc978ec8a.tar.gz relx-a5f9b6c2bea4dc4bc7b60198860f5d8fc978ec8a.tar.bz2 relx-a5f9b6c2bea4dc4bc7b60198860f5d8fc978ec8a.zip |
Merge pull request #34 from ericbmerritt/next
various bug fixes to symlinks.
Diffstat (limited to 'src/rcl_state.erl')
-rw-r--r-- | src/rcl_state.erl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/rcl_state.erl b/src/rcl_state.erl index 6fd5655..6568541 100644 --- a/src/rcl_state.erl +++ b/src/rcl_state.erl @@ -42,6 +42,8 @@ get_release/3, update_release/2, releases/1, + discovered_releases/1, + discovered_releases/2, default_release/1, default_release/3, available_apps/1, @@ -72,9 +74,8 @@ default_release :: {rcl_release:name(), rcl_release:vsn()}, sys_config :: file:filename() | undefined, overrides :: [{AppName::atom(), Directory::file:filename()}], - releases :: ec_dictionary:dictionary({ReleaseName::atom(), - ReleaseVsn::string()}, - rcl_release:t()), + releases :: releases(), + discovered_releases :: releases(), config_values :: ec_dictionary:dictionary(Key::atom(), Value::term())}). @@ -87,6 +88,7 @@ rcl_release:t()). -type cmd_args() :: proplists:proplist(). -type caller() :: command_line | api. + -opaque t() :: record(state_t). %%============================================================================ @@ -107,6 +109,7 @@ new(PropList, Target) goals=proplists:get_value(goals, PropList, []), providers = [], releases=ec_dictionary:new(ec_dict), + discovered_releases=ec_dictionary:new(ec_dict), config_values=ec_dictionary:new(ec_dict), overrides = proplists:get_value(overrides, PropList, []), root_dir = proplists:get_value(root_dir, PropList, Root), @@ -197,6 +200,14 @@ get_release(#state_t{releases=Releases}, Name, Vsn) -> releases(#state_t{releases=Releases}) -> Releases. +-spec discovered_releases(t()) -> releases(). +discovered_releases(#state_t{discovered_releases=Releases}) -> + Releases. + +-spec discovered_releases(t(), releases()) -> t(). +discovered_releases(State, Releases) -> + State#state_t{discovered_releases=Releases}. + -spec default_release(t()) -> {rcl_release:name() | undefined, rcl_release:vsn() | undefined}. default_release(#state_t{default_release=Def}) -> |