mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-03-01 17:34:22 +08:00
When setting windows env variables, we cannot use quotes because they are part of the values.
21 lines
693 B
Elixir
21 lines
693 B
Elixir
if exist "!RELEASE_ROOT!\user\env.bat" (
|
|
call "!RELEASE_ROOT!\user\env.bat"
|
|
)
|
|
|
|
if "!LIVEBOOK_EPMDLESS!"=="1" goto epmdless
|
|
if "!LIVEBOOK_EPMDLESS!"=="true" goto epmdless
|
|
goto continue
|
|
:epmdless
|
|
set ELIXIR_ERL_OPTIONS=!ELIXIR_ERL_OPTIONS! -epmd_module Elixir.Livebook.EPMD -start_epmd false -erl_epmd_port 0
|
|
:continue
|
|
|
|
set RELEASE_MODE=interactive
|
|
set RELEASE_DISTRIBUTION=none
|
|
|
|
if defined LIVEBOOK_NODE set RELEASE_NODE=!LIVEBOOK_NODE!
|
|
if defined LIVEBOOK_COOKIE set RELEASE_COOKIE=!LIVEBOOK_COOKIE!
|
|
|
|
if not defined RELEASE_COOKIE (
|
|
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
|
|
set RELEASE_COOKIE=cookie-!TIMESTAMP:~0,11!-!RANDOM!
|
|
)
|