diff options
author | Tristan Sloughter <[email protected]> | 2019-05-20 10:29:09 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2019-05-20 10:29:09 -0600 |
commit | 407b0250ce73c8e2071ea2526e01ecfaf4fe841d (patch) | |
tree | 097769798d2d6d00fe3e2ff8a17a04034bf52a8f /src/rlx_prv_release.erl | |
parent | cca2a6cade4d97b5b36ca7c055d25677860bdc5d (diff) | |
parent | 670a602f657eeb6ac17589407df8e43cf4d1be89 (diff) | |
download | relx-407b0250ce73c8e2071ea2526e01ecfaf4fe841d.tar.gz relx-407b0250ce73c8e2071ea2526e01ecfaf4fe841d.tar.bz2 relx-407b0250ce73c8e2071ea2526e01ecfaf4fe841d.zip |
Merge pull request #668 from ElectronicRU/goals_option
Make {goals, ...} option add goals to release depsolver.
Diffstat (limited to 'src/rlx_prv_release.erl')
-rw-r--r-- | src/rlx_prv_release.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rlx_prv_release.erl b/src/rlx_prv_release.erl index 8de1a51..9be190e 100644 --- a/src/rlx_prv_release.erl +++ b/src/rlx_prv_release.erl @@ -168,12 +168,14 @@ solve_release(State0, DepGraph, RelName, RelVsn) -> %% get per release config values and override the State with them Config = rlx_release:config(Release), {ok, State1} = lists:foldl(fun rlx_config:load_terms/2, {ok, State0}, Config), - Goals = rlx_release:goals(Release), - case Goals of + Goals = rlx_release:constraints(Release), + GlobalGoals = rlx_state:goals(State1), + MergedGoals = rlx_release:merge_application_goals(Goals, GlobalGoals), + case MergedGoals of [] -> ?RLX_ERROR(no_goals_specified); _ -> - case rlx_depsolver:solve(DepGraph, Goals) of + case rlx_depsolver:solve(DepGraph, MergedGoals) of {ok, Pkgs} -> set_resolved(State1, Release, Pkgs); {error, Error} -> |