summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoewilliams <joe@joetify.com>2011-10-17 14:53:27 -0700
committerjoewilliams <joe@joetify.com>2011-10-17 14:53:27 -0700
commit644bb0a312614b7d30976505fe013394f9782b01 (patch)
treeba320a8fd42c8c762d9085673ce4e7ca1782e8fa
parentf82028a544e62a2e712e9118fbc9225bcd74e351 (diff)
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.
-rw-r--r--src/rebar_upgrade.erl5
1 files changed, 5 insertions, 0 deletions
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"])).