aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2013-01-25 04:14:05 -0800
committerJordan Wilberding <[email protected]>2013-01-25 04:14:05 -0800
commite29f7fa585670f2bb1aad6060bfa2fe0aeba1cd8 (patch)
treeccc9c612deac643818f62166c2827c018574f0b6
parent1a43e62a5ee0ceafb2082a41e632489b48e7f567 (diff)
parent58f0df46df654f6221aff6534477b5df1076e0fa (diff)
downloadrelx-e29f7fa585670f2bb1aad6060bfa2fe0aeba1cd8.tar.gz
relx-e29f7fa585670f2bb1aad6060bfa2fe0aeba1cd8.tar.bz2
relx-e29f7fa585670f2bb1aad6060bfa2fe0aeba1cd8.zip
Merge pull request #21 from ericbmerritt/next
working towards release upgrades
-rw-r--r--Makefile1
-rw-r--r--README.md5
-rw-r--r--src/rcl_app_info.erl2
-rw-r--r--src/rcl_cmd_args.erl80
-rw-r--r--src/rcl_goal_utils.erl2
-rw-r--r--src/rcl_log.erl2
-rw-r--r--src/rcl_provider.erl16
-rw-r--r--src/rcl_prv_assembler.erl2
-rw-r--r--src/rcl_prv_config.erl16
-rw-r--r--src/rcl_prv_discover.erl2
-rw-r--r--src/rcl_prv_overlay.erl2
-rw-r--r--src/rcl_prv_release.erl2
-rw-r--r--src/rcl_release.erl2
-rw-r--r--src/rcl_state.erl14
-rw-r--r--src/rcl_topo.erl17
-rw-r--r--src/rcl_util.erl2
-rw-r--r--src/relcool.erl10
-rw-r--r--test/rclt_command_SUITE.erl4
-rw-r--r--test/rclt_discover_SUITE.erl4
-rw-r--r--test/rclt_goal.erl2
-rw-r--r--test/rclt_release_SUITE.erl26
21 files changed, 142 insertions, 71 deletions
diff --git a/Makefile b/Makefile
index 1cf2e23..a7e9bb6 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@ eunit: compile clean-common-test-data
$(REBAR) skip_deps=true eunit
ct: compile clean-common-test-data
+ mkdir -p $(CURDIR) logs
ct_run -pa $(CURDIR)/ebin \
-pa $(CURDIR)/deps/*/ebin \
-logdir $(CURDIR)/logs \
diff --git a/README.md b/README.md
index 99fef81..5407002 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ applications it will generate a release output. That output depends
heavily on what plugins available and what options are defined, but
usually it is simple a well configured release directory.
- relcool -l ~/my-dirs --relname foo --relvsn 0.0.1 --target-spec myapp --target-spec getopt>=0.5.1 -o output-dir --targz
+ relcool -c relcool.config -l ~/my-dirs --relname foo --relvsn 0.0.1 --target-spec myapp --target-spec getopt>=0.5.1 -o output-dir
The *release-specification-file* is optional but otherwise contains
additional specification information for releases.
@@ -43,6 +43,9 @@ additional specification information for releases.
-V *INTEGER*, \--verbose *INTEGER*
: The verbosity level of the system. Valid values are 1 - 3
+-c *INTEGER*, \--config *INTEGER*
+: The custom config file for the relcool system
+
# CONFIGURATION FILES
Configuration files
diff --git a/src/rcl_app_info.erl b/src/rcl_app_info.erl
index b73d609..f2afa0b 100644
--- a/src/rcl_app_info.erl
+++ b/src/rcl_app_info.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl
index 6340201..973abe3 100644
--- a/src/rcl_cmd_args.erl
+++ b/src/rcl_cmd_args.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -38,18 +38,17 @@ args2state({ok, {Opts, Target}})
when erlang:length(Target) == 0; erlang:length(Target) == 1 ->
RelName = proplists:get_value(relname, Opts, undefined),
RelVsn = proplists:get_value(relvsn, Opts, undefined),
- case create_log(Opts,
- [{relname, RelName},
- {relvsn, RelVsn}]) of
- Error = {error, _} ->
- Error;
- {ok, CommandLineConfig} ->
- case validate_configs(Target) of
+ case convert_target(Target) of
+ {ok, AtomizedTarget} ->
+ case create_log(Opts, [{relname, RelName},
+ {relvsn, RelVsn}]) of
Error = {error, _} ->
Error;
- {ok, Configs} ->
- {ok, rcl_state:new(CommandLineConfig, Configs)}
- end
+ {ok, CommandLineConfig} ->
+ handle_config(Opts, AtomizedTarget, CommandLineConfig)
+ end;
+ Error ->
+ Error
end;
args2state({ok, {_Opts, Targets}}) ->
?RCL_ERROR({invalid_targets, Targets}).
@@ -84,32 +83,47 @@ format_error({not_directory, Dir}) ->
io_lib:format("Library directory does not exist: ~s", [Dir]);
format_error({invalid_log_level, LogLevel}) ->
io_lib:format("Invalid log level specified -V ~p, log level must be in the"
- " range 0..2", [LogLevel]).
+ " range 0..2", [LogLevel]);
+format_error({invalid_target, Target}) ->
+ io_lib:format("Invalid action specified: ~s", [Target]).
+
%%%===================================================================
%%% Internal Functions
%%%===================================================================
--spec validate_configs([file:filename()]) ->
- {ok, [file:filename()]} | relcool:error().
-validate_configs(Configs) ->
- Result =
- lists:foldl(fun(_Config, Err = {error, _}) ->
- Err;
- (Config, Acc) ->
- case filelib:is_regular(Config) of
- true ->
- [filename:absname(Config) | Acc];
- false ->
- ?RCL_ERROR({invalid_config_file, Config})
- end
- end, [], Configs),
- case Result of
- {error, _} ->
- Result;
- _ ->
- %% Order may be important so lets make sure they remain in the same
- %% order they came in as
- {ok, lists:reverse(Result)}
+-spec handle_config([getopt:option()], atom(), proplists:proplist()) ->
+ {ok, {rcl_state:t(), [string()]}} |
+ relcool:error().
+handle_config(Opts, Target, CommandLineConfig) ->
+ case validate_config(proplists:get_value(config, Opts, [])) of
+ Error = {error, _} ->
+ Error;
+ {ok, Config} ->
+ {ok, rcl_state:new([{config, Config} | CommandLineConfig], Target)}
+ end.
+
+-spec convert_target([string()]) -> {ok, release | relup} | relcool:error().
+convert_target([]) ->
+ {ok, release};
+convert_target(["release"]) ->
+ {ok, release};
+convert_target(["relup"]) ->
+ {ok, relup};
+convert_target(Target) ->
+ ?RCL_ERROR({invalid_target, Target}).
+
+-spec validate_config(file:filename() | undefined) ->
+ {ok, file:filename() | undefined} | relcool:error().
+validate_config(undefined) ->
+ {ok, undefined};
+validate_config("") ->
+ {ok, undefined};
+validate_config(Config) ->
+ case filelib:is_regular(Config) of
+ true ->
+ filename:absname(Config);
+ false ->
+ ?RCL_ERROR({invalid_config_file, Config})
end.
-spec create_log([getopt:option()], rcl_state:cmd_args()) ->
diff --git a/src/rcl_goal_utils.erl b/src/rcl_goal_utils.erl
index 3627b9c..6065e5c 100644
--- a/src/rcl_goal_utils.erl
+++ b/src/rcl_goal_utils.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_log.erl b/src/rcl_log.erl
index a24b1c0..71c0b5d 100644
--- a/src/rcl_log.erl
+++ b/src/rcl_log.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl
index c3ef434..750b96e 100644
--- a/src/rcl_provider.erl
+++ b/src/rcl_provider.erl
@@ -1,3 +1,19 @@
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
+%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
+%%%
+%%% This file is provided to you under the Apache License,
+%%% Version 2.0 (the "License"); you may not use this file
+%%% except in compliance with the License. You may obtain
+%%% a copy of the License at
+%%%
+%%% http://www.apache.org/licenses/LICENSE-2.0
+%%%
+%%% Unless required by applicable law or agreed to in writing,
+%%% software distributed under the License is distributed on an
+%%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%%% KIND, either express or implied. See the License for the
+%%% specific language governing permissions and limitations
+%%% under the License.
%%%-------------------------------------------------------------------
%%% @author Eric Merritt <[email protected]>
%%% @copyright 2011 Erlware, LLC.
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl
index 61f6dad..5488617 100644
--- a/src/rcl_prv_assembler.erl
+++ b/src/rcl_prv_assembler.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_prv_config.erl b/src/rcl_prv_config.erl
index f87c467..5d51300 100644
--- a/src/rcl_prv_config.erl
+++ b/src/rcl_prv_config.erl
@@ -1,3 +1,19 @@
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
+%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
+%%%
+%%% This file is provided to you under the Apache License,
+%%% Version 2.0 (the "License"); you may not use this file
+%%% except in compliance with the License. You may obtain
+%%% a copy of the License at
+%%%
+%%% http://www.apache.org/licenses/LICENSE-2.0
+%%%
+%%% Unless required by applicable law or agreed to in writing,
+%%% software distributed under the License is distributed on an
+%%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%%% KIND, either express or implied. See the License for the
+%%% specific language governing permissions and limitations
+%%% under the License.
%%%-------------------------------------------------------------------
%%% @author Eric Merritt <[email protected]>
%%% @copyright 2011 Erlware, LLC.
diff --git a/src/rcl_prv_discover.erl b/src/rcl_prv_discover.erl
index 4e7ce72..595902a 100644
--- a/src/rcl_prv_discover.erl
+++ b/src/rcl_prv_discover.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_prv_overlay.erl b/src/rcl_prv_overlay.erl
index 94b5f3d..40471ea 100644
--- a/src/rcl_prv_overlay.erl
+++ b/src/rcl_prv_overlay.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_prv_release.erl b/src/rcl_prv_release.erl
index 8a86e02..a98048f 100644
--- a/src/rcl_prv_release.erl
+++ b/src/rcl_prv_release.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_release.erl b/src/rcl_release.erl
index aa5de72..560a555 100644
--- a/src/rcl_release.erl
+++ b/src/rcl_release.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/rcl_state.erl b/src/rcl_state.erl
index 842b635..ecf3115 100644
--- a/src/rcl_state.erl
+++ b/src/rcl_state.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -62,6 +62,7 @@
-record(state_t, {log :: rcl_log:t(),
root_dir :: file:name(),
caller :: caller(),
+ action :: atom(),
output_dir :: file:name(),
lib_dirs=[] :: [file:name()],
config_file=[] :: file:filename(),
@@ -92,14 +93,17 @@
%% API
%%============================================================================
%% @doc Create a new 'log level' for the system
--spec new(proplists:proplist(), [file:filename()] | file:filename()) -> t().
-new(PropList, Target) when erlang:is_list(PropList) ->
+-spec new(proplists:proplist(), atom()) -> t().
+new(PropList, Target)
+ when erlang:is_list(PropList),
+ erlang:is_atom(Target) ->
{ok, Root} = file:get_cwd(),
State0 =
#state_t{log = proplists:get_value(log, PropList, rcl_log:new(error)),
output_dir=proplists:get_value(output_dir, PropList, ""),
lib_dirs=proplists:get_value(lib_dirs, PropList, ""),
- config_file=Target,
+ config_file=proplists:get_value(config, PropList, ""),
+ action = Target,
goals=proplists:get_value(goals, PropList, []),
providers = [],
releases=ec_dictionary:new(ec_dict),
@@ -286,7 +290,7 @@ create_logic_providers(State0) ->
new_test() ->
LogState = rcl_log:new(error),
- RCLState = new([{log, LogState}], []),
+ RCLState = new([{log, LogState}], release),
?assertMatch(LogState, log(RCLState)).
-endif.
diff --git a/src/rcl_topo.erl b/src/rcl_topo.erl
index ec67b56..462b7c5 100644
--- a/src/rcl_topo.erl
+++ b/src/rcl_topo.erl
@@ -1,4 +1,19 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
+%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
+%%%
+%%% This file is provided to you under the Apache License,
+%%% Version 2.0 (the "License"); you may not use this file
+%%% except in compliance with the License. You may obtain
+%%% a copy of the License at
+%%%
+%%% http://www.apache.org/licenses/LICENSE-2.0
+%%%
+%%% Unless required by applicable law or agreed to in writing,
+%%% software distributed under the License is distributed on an
+%%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%%% KIND, either express or implied. See the License for the
+%%% specific language governing permissions and limitations
+%%% under the License.
%%%-------------------------------------------------------------------
%%% @author Joe Armstrong
%%% @author Eric Merritt
diff --git a/src/rcl_util.erl b/src/rcl_util.erl
index f89ba73..06d957d 100644
--- a/src/rcl_util.erl
+++ b/src/rcl_util.erl
@@ -1,4 +1,4 @@
-%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/src/relcool.erl b/src/relcool.erl
index 974b19f..83886c5 100644
--- a/src/relcool.erl
+++ b/src/relcool.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -48,7 +48,7 @@ main(Args) ->
{ok, State} ->
run_relcool_process(rcl_state:caller(State, command_line));
Error={error, _} ->
- report_error(rcl_state:caller(rcl_state:new([], []),
+ report_error(rcl_state:caller(rcl_state:new([], undefined),
command_line), Error)
end.
@@ -106,8 +106,9 @@ do(RootDir, RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Overrides, Con
{output_dir, OutputDir},
{lib_dirs, LibDirs},
{root_dir, RootDir},
- {log, rcl_log:new(LogLevel)}],
- Config),
+ {log, rcl_log:new(LogLevel)},
+ {config, Config}],
+ release),
run_relcool_process(rcl_state:caller(State, api)).
@@ -127,6 +128,7 @@ opt_spec_list() ->
"Disable the default system added lib dirs (means you must add them all manually"},
{log_level, $V, "verbose", {integer, 1},
"Verbosity level, maybe between 0 and 2"},
+ {config, $c, "config", string, "The path to a config file"},
{root_dir, $r, "root", string, "The project root directory"}].
-spec format_error(Reason::term()) -> iolist().
diff --git a/test/rclt_command_SUITE.erl b/test/rclt_command_SUITE.erl
index bd99da0..3d06dad 100644
--- a/test/rclt_command_SUITE.erl
+++ b/test/rclt_command_SUITE.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 92 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -88,6 +88,6 @@ spec_parse_fail_case(_Config) ->
config_fail_case(_Config) ->
ConfigFile = "does-not-exist",
- CmdLine = [ConfigFile],
+ CmdLine = ["-c", ConfigFile],
?assertMatch({error, {_, {invalid_config_file, ConfigFile}}},
rcl_cmd_args:args2state(getopt:parse(relcool:opt_spec_list(), CmdLine))).
diff --git a/test/rclt_discover_SUITE.erl b/test/rclt_discover_SUITE.erl
index 6b61840..4b6cb2a 100644
--- a/test/rclt_discover_SUITE.erl
+++ b/test/rclt_discover_SUITE.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 92 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -46,7 +46,7 @@ init_per_testcase(_, Config) ->
LibDir2 = filename:join([DataDir, create_random_name("lib_dir2_")]),
ok = rcl_util:mkdir_p(LibDir1),
ok = rcl_util:mkdir_p(LibDir2),
- State = rcl_state:new([{lib_dirs, [LibDir1, LibDir2]}], []),
+ State = rcl_state:new([{lib_dirs, [LibDir1, LibDir2]}], release),
[{lib1, LibDir1},
{lib2, LibDir2},
{state, State} | Config].
diff --git a/test/rclt_goal.erl b/test/rclt_goal.erl
index 9bf6028..20fb5e5 100644
--- a/test/rclt_goal.erl
+++ b/test/rclt_goal.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 92 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
diff --git a/test/rclt_release_SUITE.erl b/test/rclt_release_SUITE.erl
index 9c9c70c..95aa385 100644
--- a/test/rclt_release_SUITE.erl
+++ b/test/rclt_release_SUITE.erl
@@ -1,4 +1,4 @@
-%%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
+%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 92 -*-
%%% Copyright 2012 Erlware, LLC. All Rights Reserved.
%%%
%%% This file is provided to you under the Apache License,
@@ -52,7 +52,7 @@ init_per_testcase(_, Config) ->
DataDir = proplists:get_value(data_dir, Config),
LibDir1 = filename:join([DataDir, create_random_name("lib_dir1_")]),
ok = rcl_util:mkdir_p(LibDir1),
- State = rcl_state:new([{lib_dirs, [LibDir1]}], []),
+ State = rcl_state:new([{lib_dirs, [LibDir1]}], release),
[{lib1, LibDir1},
{state, State} | Config].
@@ -86,7 +86,7 @@ make_release(Config) ->
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relcool-output")]),
{ok, State} = relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile]),
+ OutputDir, ConfigFile),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
AppSpecs = rcl_release:applications(Release),
?assert(lists:keymember(stdlib, 1, AppSpecs)),
@@ -122,7 +122,7 @@ make_invalid_config_release(Config) ->
create_random_name("relcool-output")]),
{error, {rcl_prv_config,
{consult, _, _}}} = relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile]).
+ OutputDir, ConfigFile).
make_scriptless_release(Config) ->
LibDir1 = proplists:get_value(lib1, Config),
@@ -149,7 +149,7 @@ make_scriptless_release(Config) ->
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relcool-output")]),
{ok, State} = relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile]),
+ OutputDir, ConfigFile),
?assert(not ec_file:exists(filename:join([OutputDir, "bin", "foo"]))),
?assert(not ec_file:exists(filename:join([OutputDir, "bin", "foo-0.0.1"]))),
@@ -200,7 +200,7 @@ make_overridden_release(Config) ->
{ok, Cwd} = file:get_cwd(),
{ok, State} = relcool:do(Cwd, undefined, undefined, [], [LibDir1], 2,
OutputDir, [{OverrideAppName, OverrideAppDir}],
- [ConfigFile]),
+ ConfigFile),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
AppSpecs = rcl_release:applications(Release),
?assert(lists:keymember(stdlib, 1, AppSpecs)),
@@ -289,13 +289,13 @@ make_rerun_overridden_release(Config) ->
create_random_name("relcool-output")]),
{ok, Cwd} = file:get_cwd(),
{ok, State} = relcool:do(Cwd, undefined, undefined, [], [LibDir1], 2,
- OutputDir, [{OverrideAppName, OverrideAppDir}],
- [ConfigFile]),
+ OutputDir, [{OverrideAppName, OverrideAppDir}],
+ ConfigFile),
%% Now we run it again to see if it failse.
{ok, State} = relcool:do(Cwd,undefined, undefined, [], [LibDir1], 2,
- OutputDir, [{OverrideAppName, OverrideAppDir}],
- [ConfigFile]),
+ OutputDir, [{OverrideAppName, OverrideAppDir}],
+ ConfigFile),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
AppSpecs = rcl_release:applications(Release),
@@ -358,7 +358,7 @@ overlay_release(Config) ->
create_random_name("relcool-output")]),
{ok, State} = relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile]),
+ OutputDir, ConfigFile),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
AppSpecs = rcl_release:applications(Release),
@@ -469,7 +469,7 @@ make_goalless_release(Config) ->
create_random_name("relcool-output")]),
?assertMatch({error,{rcl_prv_release,no_goals_specified}},
relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile])).
+ OutputDir, ConfigFile)).
make_depfree_release(Config) ->
LibDir1 = proplists:get_value(lib1, Config),
@@ -494,7 +494,7 @@ make_depfree_release(Config) ->
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relcool-output")]),
{ok, State} = relcool:do(undefined, undefined, [], [LibDir1], 2,
- OutputDir, [ConfigFile]),
+ OutputDir, ConfigFile),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
AppSpecs = rcl_release:applications(Release),
?assert(lists:keymember(stdlib, 1, AppSpecs)),