From 15e39a9370ffa842e3ee64a8f7f1d64dd25b2130 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 14:32:50 -0500 Subject: support specifing overrides in the configuration Signed-off-by: Jordan Wilberding --- src/relcool.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/relcool.erl') 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() -> [ -- cgit v1.2.3