2023-10-25 17:57:00 +08:00
|
|
|
if exist "!RELEASE_ROOT!\user\env.bat" (
|
|
|
|
call "!RELEASE_ROOT!\user\env.bat"
|
2023-10-24 22:46:40 +08:00
|
|
|
)
|
|
|
|
|
2023-10-24 03:35:04 +08:00
|
|
|
set RELEASE_MODE=interactive
|
2023-02-02 04:22:49 +08:00
|
|
|
if defined LIVEBOOK_NODE set RELEASE_NODE="!LIVEBOOK_NODE!"
|
2022-09-09 04:27:26 +08:00
|
|
|
if not defined RELEASE_NODE set RELEASE_NODE=livebook_server
|
2023-02-02 04:22:49 +08:00
|
|
|
if defined LIVEBOOK_DISTRIBUTION set RELEASE_DISTRIBUTION="!LIVEBOOK_DISTRIBUTION!"
|
2023-10-24 03:35:04 +08:00
|
|
|
if not defined RELEASE_DISTRIBUTION (if defined LIVEBOOK_CLUSTER set RELEASE_DISTRIBUTION="name")
|
2022-02-15 19:44:59 +08:00
|
|
|
|
2023-10-24 20:41:49 +08:00
|
|
|
if defined LIVEBOOK_COOKIE set RELEASE_COOKIE="!LIVEBOOK_COOKIE!"
|
2022-02-15 19:44:59 +08:00
|
|
|
set cookie_path="!RELEASE_ROOT!\releases\COOKIE"
|
|
|
|
if not exist %cookie_path% (
|
2023-05-23 21:23:02 +08:00
|
|
|
if not defined RELEASE_COOKIE (
|
|
|
|
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
|
2023-06-27 19:33:18 +08:00
|
|
|
:: '| set /p=""' is so that we don't add ' \r\n' to the cookie
|
|
|
|
echo | set /p="cookie-!TIMESTAMP:~0,11!-!RANDOM!" > %cookie_path%
|
2023-05-23 21:23:02 +08:00
|
|
|
)
|
2022-02-15 19:44:59 +08:00
|
|
|
)
|