Correctly use release_handler:create_RELEASES

This commit is contained in:
joewilliams 2012-08-30 12:05:58 -07:00 committed by Tuncer Ayaz
parent 73e9413a01
commit 29492dd0e8

View file

@ -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} ->