mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
More descriptive logging for upgrade systools cmds
In debugging upgrade issues it is sometimes difficult to know which systools step a error ocurred at, a little extra logging to fix that.
This commit is contained in:
parent
5775746758
commit
f82028a544
1 changed files with 14 additions and 9 deletions
|
@ -124,19 +124,23 @@ run_systools(NewVer, Name) ->
|
|||
Opts = [silent],
|
||||
NameList = [Name],
|
||||
case systools:make_relup(NewVer, NameList, NameList, Opts) of
|
||||
{error, _, _Message} ->
|
||||
?ABORT("Systools aborted with: ~p~n", [_Message]);
|
||||
{error, _, Msg} ->
|
||||
?ABORT("Systools [systools:make_relup/4] aborted with: ~p~n",
|
||||
[Msg]);
|
||||
_ ->
|
||||
?DEBUG("Relup created~n", []),
|
||||
case systools:make_script(NewVer, Opts) of
|
||||
{error, _, _Message1} ->
|
||||
?ABORT("Systools aborted with: ~p~n", [_Message1]);
|
||||
{error, _, Msg1} ->
|
||||
?ABORT("Systools [systools:make_script/2] "
|
||||
"aborted with: ~p~n", [Msg1]);
|
||||
_ ->
|
||||
?DEBUG("Script created~n", []),
|
||||
case systools:make_tar(NewVer, Opts) of
|
||||
{error, _, _Message2} ->
|
||||
?ABORT("Systools aborted with: ~p~n", [_Message2]);
|
||||
{error, _, Msg2} ->
|
||||
?ABORT("Systools [systools:make_tar/2] "
|
||||
"aborted with: ~p~n", [Msg2]);
|
||||
_ ->
|
||||
?DEBUG("Tarball created~n", []),
|
||||
ok
|
||||
end
|
||||
end
|
||||
|
@ -149,7 +153,8 @@ boot_files(TargetDir, Ver, Name) ->
|
|||
ok = file:make_symlink(
|
||||
filename:join(["start.boot"]),
|
||||
filename:join([".", ?TMP, "releases", Ver, Name ++ ".boot"])),
|
||||
{ok, _} = file:copy(
|
||||
{ok, _} =
|
||||
file:copy(
|
||||
filename:join([TargetDir, "releases", Ver, "start_clean.boot"]),
|
||||
filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
|
||||
{ok, _} = file:copy(
|
||||
|
|
Loading…
Reference in a new issue