aboutsummaryrefslogtreecommitdiffstats
path: root/src/relcool.erl
diff options
context:
space:
mode:
authorEric <[email protected]>2012-11-21 14:32:50 -0500
committerJordan Wilberding <[email protected]>2012-11-21 16:44:04 -0700
commit15e39a9370ffa842e3ee64a8f7f1d64dd25b2130 (patch)
treec108843e51c7b1beb66317391355aea0cd31e138 /src/relcool.erl
parent79ae49d3c415627ff8e399e78828f373f38ec27a (diff)
downloadrelx-15e39a9370ffa842e3ee64a8f7f1d64dd25b2130.tar.gz
relx-15e39a9370ffa842e3ee64a8f7f1d64dd25b2130.tar.bz2
relx-15e39a9370ffa842e3ee64a8f7f1d64dd25b2130.zip
support specifing overrides in the configuration
Signed-off-by: Jordan Wilberding <[email protected]>
Diffstat (limited to 'src/relcool.erl')
-rw-r--r--src/relcool.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/relcool.erl b/src/relcool.erl
index 44debc9..1c3ec02 100644
--- a/src/relcool.erl
+++ b/src/relcool.erl
@@ -22,6 +22,7 @@
-export([main/1,
do/7,
+ do/8,
format_error/1,
opt_spec_list/0]).
@@ -59,15 +60,30 @@ main(Args) ->
%% @param OutputDir - The directory where the release should be built to
%% @param Configs - The list of config files for the system
do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Configs) ->
+ do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, [], Configs).
+
+%% @doc provides an API to run the Relcool process from erlang applications
+%%
+%% @param RelName - The release name to build (maybe `undefined`)
+%% @param RelVsn - The release version to build (maybe `undefined`)
+%% @param Goals - The release goals for the system in depsolver or Relcool goal
+%% format
+%% @param LibDirs - The library dirs that should be used for the system
+%% @param OutputDir - The directory where the release should be built to
+%% @param Overrides - A list of overrides for the system
+%% @param Configs - The list of config files for the system
+do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Overrides, Configs) ->
State = rcl_state:new([{relname, RelName},
{relvsn, RelVsn},
{goals, Goals},
+ {overrides, Overrides},
{output_dir, OutputDir},
{lib_dirs, LibDirs},
{log, rcl_log:new(LogLevel)}],
Configs),
run_relcool_process(rcl_state:caller(State, api)).
+
-spec opt_spec_list() -> [getopt:option_spec()].
opt_spec_list() ->
[