bat files containing typos & hot upgrade not working #391
Labels
bug
Things flat out don't work, or we said they would work one way but they work another
deployment:scripts
Anything to do with the management scripts
help-wanted
I need help in order to get this addressed sooner rather than later
os:windows
Issue is specific to Windows
Milestone
Error when doing a hot upgrade of a running application. I'm following step by step the Distillery chapter of the Elixir Programming 1.6 book.
Platform: Erlang 20 erts-9.2 64-bits on Windows 7, with Elixir 1.6.
Steps to reproduce
Description of issue
I'm not through yet, but found a number of bugs in the sequence.bat files found in releases/x.y.z/.bat
The script fails to run, and unfortunately exits without giving time to read the error messages. A goto :eof would be better than exit, also I understand exit is important for automation. Maybe a debug option not exiting.
Errors found so far:
`diff --git a/erts-9.2/bin/erl.ini b/erts-9.2/bin/erl.ini
index 805f6e3..97f37e6 100644
--- a/erts-9.2/bin/erl.ini
+++ b/erts-9.2/bin/erl.ini
@@ -1,4 +1,4 @@
-[erlang]
-Bindir=C:\Program Files\erl9.2\erts-9.2\bin
-Progname=erl
-Rootdir=C:\Program Files\erl9.2
+[erlang]
+Bindir=C:\Users\obou\Dropbox\Code\Elixir\Programming_Elixir_1.6\deploy2
\erts-9.2\bin
+Progname=erl.exe
+Rootdir=C:\Users\obou\Dropbox\Code\Elixir\Programming_Elixir_1.6\deploy2
diff --git a/releases/0.1.0/sequence.bat b/releases/0.1.0/sequence.bat
index 38fdd92..9787502 100644
--- a/releases/0.1.0/sequence.bat
+++ b/releases/0.1.0/sequence.bat
@@ -307,17 +307,17 @@
@set source_version=%rel_vsn%
@set target_version=%args%
:: Unpack
-@%escript% "%root_dir%\bin\release_utils.escript" ^
+@%escript% "%release_root_dir%\bin\release_utils.escript" ^
unpack_release %rel_name% "%node_type%" "%node_name%" "!cookie!" "%target_v
ersion%"
@if %ERRORLEVEL% GEQ 1 exit %ERRORLEVEL%
:: Update env
@set rel_vsn=%target_version%
-@set rel_dir=%release_root_dir\releases%target_version%
+@set rel_dir=%release_root_dir%\releases%target_version%
:: TODO: init_configs
-if exists "%rel_dir%\sys.config.bak" do (
+if exist "%rel_dir%\sys.config.bak" (
@Move /Y "%rel_dir%\sys.config.bak" "%rel_dir%\sys.config"
)
-if exists "%rel_dir%\vm.args.bak" do (
+if exist "%rel_dir%\vm.args.bak" (
@Move /Y "%rel_dir%\vm.args.bak" "%rel_dir%\vm.args"
)
@copy /B /Y "%rel_dir%/sys.config" "%rel_dir%\sys.config.bak"
`
I fixed all of these but it's still not working, will update ticket if I find more errors.
The text was updated successfully, but these errors were encountered: