From 50f384715bf7452b0083d0392694a2f980173fd1 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 6 Dec 2014 17:02:39 -0600 Subject: in relx tar call only include deps dirs if they exist --- src/rebar_prv_tar.erl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/rebar_prv_tar.erl') diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl index ae1942b..40a84e3 100644 --- a/src/rebar_prv_tar.erl +++ b/src/rebar_prv_tar.erl @@ -32,16 +32,18 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> - OutputDir = filename:join(rebar_dir:profile_dir(State), ?DEFAULT_RELEASE_DIR), Options = rebar_state:command_args(State), - DepsDir = rebar_dir:deps_dir(State), + DepsDir = rebar_dir:default_deps_dir(State), + ProfileDepsDir = rebar_dir:deps_dir(State), + LibDirs = lists:usort(rebar_utils:filtermap(fun ec_file:exists/1, [DepsDir, ProfileDepsDir])), + OutputDir = filename:join(rebar_dir:profile_dir(State), ?DEFAULT_RELEASE_DIR), AllOptions = string:join(["release", "tar" | Options], " "), case rebar_state:get(State, relx, []) of [] -> - relx:main([{lib_dirs, [DepsDir] + relx:main([{lib_dirs, LibDirs ,{output_dir, OutputDir}}], AllOptions); Config -> - relx:main([{lib_dirs, [DepsDir]} + relx:main([{lib_dirs, LibDirs} ,{config, Config} ,{output_dir, OutputDir}], AllOptions) end, -- cgit v1.1 From f77cbb7f508345c1352b957d75e0e350725f707c Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 6 Dec 2014 17:47:41 -0600 Subject: don't lose defualt deps when creating current profile --- src/rebar_prv_tar.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rebar_prv_tar.erl') diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl index 40a84e3..0225e19 100644 --- a/src/rebar_prv_tar.erl +++ b/src/rebar_prv_tar.erl @@ -12,7 +12,7 @@ -include("rebar.hrl"). -define(PROVIDER, tar). --define(DEPS, [compile]). +-define(DEPS, [{compile, default}, compile]). %% =================================================================== %% Public API -- cgit v1.1