Permalink
Browse files

Correctly use release_handler:create_RELEASES

  • Loading branch information...
1 parent 73e9413 commit 29492dd0e8d00c3a43b3591ede5d99abb6a88cd3 @joewilliams joewilliams committed with tuncer Aug 30, 2012
Showing with 15 additions and 3 deletions.
  1. +15 −3 src/rebar_reltool.erl
View
@@ -344,10 +344,22 @@ apply_file_info(InFile, OutFile) ->
create_RELEASES(TargetDir, RelName, RelVsn) ->
ReleasesDir = filename:join(TargetDir, "releases"),
+ RelFile = filename:join([ReleasesDir, RelVsn, RelName ++ ".rel"]),
+ Apps = rebar_rel_utils:get_rel_apps(RelFile),
+ TargetLib = filename:join(TargetDir,"lib"),
+
+ AppDirs =
+ [ {App, Vsn, TargetLib}
+ || {App, Vsn} <- Apps,
+ filelib:is_dir(
+ filename:join(TargetLib,
+ lists:concat([App, "-", Vsn]))) ],
+
case release_handler:create_RELEASES(
- ".", ReleasesDir,
- filename:join([ReleasesDir, RelVsn, RelName ++ ".rel"]),
- filename:join(TargetDir, "lib")) of
+ code:root_dir(),
+ ReleasesDir,
+ RelFile,
+ AppDirs) of
ok ->
ok;
{error, Reason} ->

0 comments on commit 29492dd

Please sign in to comment.