aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_release.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-07-17 18:44:57 -0500
committerTristan Sloughter <[email protected]>2015-07-18 10:45:15 -0500
commitc211c73cd6de507bf57d29098502de264b88afc8 (patch)
treeaf52d14b9266fd87a76a3aee100541262ffe0db7 /src/rlx_release.erl
parent6fdfb10ca4db6d03c40c75a0e03fc492bce13fc9 (diff)
downloadrelx-c211c73cd6de507bf57d29098502de264b88afc8.tar.gz
relx-c211c73cd6de507bf57d29098502de264b88afc8.tar.bz2
relx-c211c73cd6de507bf57d29098502de264b88afc8.zip
fix console_clean in dev_mode by always creating start_clean.boot
Diffstat (limited to 'src/rlx_release.erl')
-rw-r--r--src/rlx_release.erl16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/rlx_release.erl b/src/rlx_release.erl
index a84bad3..97187a6 100644
--- a/src/rlx_release.erl
+++ b/src/rlx_release.erl
@@ -38,6 +38,7 @@
application_details/2,
realized/1,
metadata/1,
+ start_clean_metadata/1,
canonical_name/1,
format/1,
format/2,
@@ -172,7 +173,7 @@ realized(#release_t{realized=Realized}) ->
-spec metadata(t()) -> term().
metadata(#release_t{name=Name, vsn=Vsn, erts=ErtsVsn, applications=Apps,
- realized=Realized}) ->
+ realized=Realized}) ->
case Realized of
true ->
{ok, {release, {erlang:atom_to_list(Name), Vsn}, {erts, ErtsVsn},
@@ -181,6 +182,19 @@ metadata(#release_t{name=Name, vsn=Vsn, erts=ErtsVsn, applications=Apps,
?RLX_ERROR({not_realized, Name, Vsn})
end.
+-spec start_clean_metadata(t()) -> term().
+start_clean_metadata(#release_t{name=Name, vsn=Vsn, erts=ErtsVsn, applications=Apps,
+ realized=Realized}) ->
+ case Realized of
+ true ->
+ Kernel = lists:keyfind(kernel, 1, Apps),
+ StdLib = lists:keyfind(stdlib, 1, Apps),
+ {ok, {release, {erlang:atom_to_list(Name), Vsn}, {erts, ErtsVsn},
+ [Kernel, StdLib]}};
+ false ->
+ ?RLX_ERROR({not_realized, Name, Vsn})
+ end.
+
%% @doc produce the canonical name (<name>-<vsn>) for this release
-spec canonical_name(t()) -> string().
canonical_name(#release_t{name=Name, vsn=Vsn}) ->