From 644bb0a312614b7d30976505fe013394f9782b01 Mon Sep 17 00:00:00 2001 From: joewilliams Date: Mon, 17 Oct 2011 14:53:27 -0700 Subject: [PATCH] Copy sys.config into upgrade tarball While building an upgrade the sys.config file should be copied into the upgrade tarball so release_handler:install_releases/1 does not clobber the existing configuration from the application environment. --- src/rebar_upgrade.erl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rebar_upgrade.erl b/src/rebar_upgrade.erl index b913ef2..fb14707 100644 --- a/src/rebar_upgrade.erl +++ b/src/rebar_upgrade.erl @@ -157,6 +157,11 @@ boot_files(TargetDir, Ver, Name) -> file:copy( filename:join([TargetDir, "releases", Ver, "start_clean.boot"]), filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])), + + {ok, _} = file:copy( + filename:join([TargetDir, "releases", Ver, "sys.config"]), + filename:join([".", ?TMP, "releases", Ver, "sys.config"])), + {ok, _} = file:copy( filename:join([TargetDir, "releases", Ver, "vm.args"]), filename:join([".", ?TMP, "releases", Ver, "vm.args"])).