mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Merge pull request #137 from bosqueviejo/master
let vm.args and sys.config as optional
This commit is contained in:
commit
4dfdd726ad
1 changed files with 16 additions and 6 deletions
|
@ -184,13 +184,23 @@ boot_files(TargetDir, Ver, Name) ->
|
||||||
filename:join([TargetDir, "releases", Ver, "start_clean.boot"]),
|
filename:join([TargetDir, "releases", Ver, "start_clean.boot"]),
|
||||||
filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
|
filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
|
||||||
|
|
||||||
|
SysConfig = filename:join([TargetDir, "releases", Ver, "sys.config"]),
|
||||||
|
case filelib:is_regular(SysConfig) of
|
||||||
|
true ->
|
||||||
{ok, _} = file:copy(
|
{ok, _} = file:copy(
|
||||||
filename:join([TargetDir, "releases", Ver, "sys.config"]),
|
SysConfig,
|
||||||
filename:join([".", ?TMP, "releases", Ver, "sys.config"])),
|
filename:join([".", ?TMP, "releases", Ver, "sys.config"]));
|
||||||
|
false -> ok
|
||||||
|
end,
|
||||||
|
|
||||||
|
VmArgs = filename:join([TargetDir, "releases", Ver, "vm.args"]),
|
||||||
|
case filelib:is_regular(VmArgs) of
|
||||||
|
true ->
|
||||||
{ok, _} = file:copy(
|
{ok, _} = file:copy(
|
||||||
filename:join([TargetDir, "releases", Ver, "vm.args"]),
|
VmArgs,
|
||||||
filename:join([".", ?TMP, "releases", Ver, "vm.args"])).
|
filename:join([".", ?TMP, "releases", Ver, "vm.args"]));
|
||||||
|
false -> {ok, 0}
|
||||||
|
end.
|
||||||
|
|
||||||
make_tar(NameVer, NewVer, NewName) ->
|
make_tar(NameVer, NewVer, NewName) ->
|
||||||
Filename = NameVer ++ ".tar.gz",
|
Filename = NameVer ++ ".tar.gz",
|
||||||
|
|
Loading…
Reference in a new issue