summaryrefslogtreecommitdiff
path: root/src/rebar_prv_tar.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-12-06 21:15:06 -0500
committerFred Hebert <mononcqc@ferd.ca>2014-12-06 21:15:06 -0500
commit40ef004f39185835bdfe6939fce5c6235325bfbf (patch)
tree395e3fd94c2314bf69428c9f2065937af358bdcc /src/rebar_prv_tar.erl
parentfb98dde7ecb894fe74055449dcaea77aa237115b (diff)
parentb849b36b5ecabe83d9c72f4370d7bc44c57f84e6 (diff)
Merge pull request #46 from tsloughter/master
Fixes for profiles breaking templates and installing of non-default deps
Diffstat (limited to 'src/rebar_prv_tar.erl')
-rw-r--r--src/rebar_prv_tar.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl
index ae1942b..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
@@ -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,