Respect LIVEBOOK_DISTRIBUTION env var in releases (#2570)

This commit is contained in:
José Valim 2024-04-15 16:35:22 +02:00 committed by GitHub
parent 6cc22501c9
commit 6a756b415f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -4,8 +4,12 @@ if exist "!USERPROFILE!\.livebookdesktop.bat" (
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
if defined LIVEBOOK_DISTRIBUTION set RELEASE_DISTRIBUTION="!LIVEBOOK_DISTRIBUTION!"
if not defined RELEASE_DISTRIBUTION set RELEASE_DISTRIBUTION="sname"
if defined LIVEBOOK_NODE set RELEASE_NODE="!LIVEBOOK_NODE!"
if not defined RELEASE_NODE set RELEASE_NODE="livebook-app-!TIMESTAMP:~8,6!-!RANDOM!"
set RELEASE_MODE=interactive
set MIX_ARCHIVES=!RELEASE_ROOT!\vendor\archives
set MIX_REBAR3=!RELEASE_ROOT!\vendor\rebar3

View file

@ -8,6 +8,7 @@ if [[ "$hostname" =~ " " ]]; then
exit 1
fi
export RELEASE_DISTRIBUTION=${LIVEBOOK_DISTRIBUTION:-${RELEASE_DISTRIBUTION:-"sname"}}
export RELEASE_NODE=${LIVEBOOK_NODE:-${RELEASE_NODE:-"livebook-app-$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)"}}
export RELEASE_MODE=interactive
export MIX_ARCHIVES="${RELEASE_ROOT}/vendor/archives"