aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_release.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-09-09 20:16:55 -0500
committerTristan Sloughter <[email protected]>2013-09-11 20:07:33 -0500
commitff0a11dc7b2e2ef902c97a62595b29e9bc89029a (patch)
treea96c523adba91117ee3ce4cfa557155c0cc303db /src/rlx_prv_release.erl
parent2f54b2d5360c52fff2c3f8fde73b29b6069174ea (diff)
downloadrelx-ff0a11dc7b2e2ef902c97a62595b29e9bc89029a.tar.gz
relx-ff0a11dc7b2e2ef902c97a62595b29e9bc89029a.tar.bz2
relx-ff0a11dc7b2e2ef902c97a62595b29e9bc89029a.zip
allow multiple actions, including new action tar
Diffstat (limited to 'src/rlx_prv_release.erl')
-rw-r--r--src/rlx_prv_release.erl17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/rlx_prv_release.erl b/src/rlx_prv_release.erl
index ce14f4e..cf13953 100644
--- a/src/rlx_prv_release.erl
+++ b/src/rlx_prv_release.erl
@@ -142,7 +142,13 @@ solve_release(State0, DepGraph, RelName, RelVsn) ->
"Solving Release ~p-~s~n",
[RelName, RelVsn]),
try
- Release = rlx_state:get_configured_release(State0, RelName, RelVsn),
+ Release =
+ case get_realized_release(State0, RelName, RelVsn) of
+ undefined ->
+ rlx_state:get_configured_release(State0, RelName, RelVsn);
+ {ok, Release0} ->
+ rlx_release:relfile(rlx_state:get_configured_release(State0, RelName, RelVsn), rlx_release:relfile(Release0))
+ end,
Goals = rlx_release:goals(Release),
case Goals of
[] ->
@@ -176,6 +182,15 @@ set_resolved(State, Release0, Pkgs) ->
?RLX_ERROR({release_error, E})
end.
+get_realized_release(State, RelName, RelVsn) ->
+ try
+ Release = rlx_state:get_realized_release(State, RelName, RelVsn),
+ {ok, Release}
+ catch
+ throw:not_found ->
+ undefined
+ end.
+
%%%===================================================================
%%% Test Functions
%%%===================================================================