Skip to content

Commit

Permalink
Support .livebookdesktop.{sh,bat} setting LIVEBOOK_NODE/RELEASE_NODE …
Browse files Browse the repository at this point in the history
…& LIVEBOOK_SHUTDOWN_ENABLED (#2464)
  • Loading branch information
AviKav authored Jan 31, 2024
1 parent a4a428d commit 6837a2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions rel/app/env.bat.eex
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ if exist "!USERPROFILE!\.livebookdesktop.bat" (
call "!USERPROFILE!\.livebookdesktop.bat"
)

set RELEASE_NODE=livebook_app
if defined LIVEBOOK_NODE set RELEASE_NODE="!LIVEBOOK_NODE!"
if not defined RELEASE_NODE set RELEASE_NODE=livebook_server
set RELEASE_MODE=interactive
set MIX_ARCHIVES=!RELEASE_ROOT!\vendor\archives
set MIX_REBAR3=!RELEASE_ROOT!\vendor\rebar3
set LIVEBOOK_SHUTDOWN_ENABLED=true
if not defined LIVEBOOK_SHUTDOWN_ENABLED set LIVEBOOK_SHUTDOWN_ENABLED=true
set LIVEBOOK_DESKTOP=true
if not defined LIVEBOOK_PORT (set LIVEBOOK_PORT=0)
set PATH=!RELEASE_ROOT!\vendor\otp\erts-<%= @release.erts_version%>\bin;!RELEASE_ROOT!\vendor\otp\bin;!RELEASE_ROOT!\vendor\elixir\bin;!PATH!
Expand Down
4 changes: 2 additions & 2 deletions rel/app/env.sh.eex
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ if [[ "$hostname" =~ " " ]]; then
exit 1
fi

export RELEASE_NODE=livebook_app
export RELEASE_NODE=${LIVEBOOK_NODE:-${RELEASE_NODE:-livebook_app}}
export RELEASE_MODE=interactive
export MIX_ARCHIVES="${RELEASE_ROOT}/vendor/archives"
export MIX_REBAR3="${RELEASE_ROOT}/vendor/rebar3"
export LIVEBOOK_SHUTDOWN_ENABLED=true
export LIVEBOOK_SHUTDOWN_ENABLED=${LIVEBOOK_SHUTDOWN_ENABLED:-true}
export LIVEBOOK_DESKTOP=true
[ -z "$LIVEBOOK_PORT" ] && export LIVEBOOK_PORT=0
export PATH="$RELEASE_ROOT/vendor/otp/erts-<%= @release.erts_version%>/bin:$RELEASE_ROOT/vendor/otp/bin:$RELEASE_ROOT/vendor/elixir/bin:$PATH"
Expand Down

0 comments on commit 6837a2f

Please sign in to comment.