mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-09 00:17:59 +08:00
19 lines
838 B
Elixir
19 lines
838 B
Elixir
if exist "!RELEASE_ROOT!\user\env.bat" (
|
|
call "!RELEASE_ROOT!\user\env.bat"
|
|
)
|
|
|
|
set RELEASE_MODE=interactive
|
|
if defined LIVEBOOK_NODE set RELEASE_NODE="!LIVEBOOK_NODE!"
|
|
if not defined RELEASE_NODE set RELEASE_NODE=livebook_server
|
|
if defined LIVEBOOK_DISTRIBUTION set RELEASE_DISTRIBUTION="!LIVEBOOK_DISTRIBUTION!"
|
|
if not defined RELEASE_DISTRIBUTION (if defined LIVEBOOK_CLUSTER set RELEASE_DISTRIBUTION="name")
|
|
|
|
if defined LIVEBOOK_COOKIE set RELEASE_COOKIE="!LIVEBOOK_COOKIE!"
|
|
set cookie_path="!RELEASE_ROOT!\releases\COOKIE"
|
|
if not exist %cookie_path% (
|
|
if not defined RELEASE_COOKIE (
|
|
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
|
|
:: '| set /p=""' is so that we don't add ' \r\n' to the cookie
|
|
echo | set /p="cookie-!TIMESTAMP:~0,11!-!RANDOM!" > %cookie_path%
|
|
)
|
|
)
|