Skip to content

Commit 64b10e0

Browse files
Do not symlink priv (#2965)
1 parent 628272e commit 64b10e0

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,3 @@ npm-debug.log
3333

3434
# The built Escript
3535
/livebook
36-
37-
# We generate priv when building release or escript
38-
/priv/static
39-
/priv/iframe_static

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ COPY config config
5757
RUN mix do deps.get, deps.compile
5858

5959
# Compile and build the release
60-
COPY priv/.gitkeep priv/.gitkeep
6160
COPY rel rel
6261
COPY static static
6362
COPY iframe/priv/static/iframe iframe/priv/static/iframe

lib/mix/tasks/livebook.gen_priv.ex

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
defmodule Mix.Tasks.Livebook.GenPriv do
22
@moduledoc false
33

4-
# Note that we need to include priv/.gitkeep in Dockerfile and Hex
5-
# package files, so that priv/ is symlinked within _build/, before
6-
# we generate the actual files.
7-
84
use Mix.Task
95

106
@gzippable_exts ~w(.js .css .txt .text .html .json .svg .eot .ttf)
117

128
@impl true
139
def run([]) do
14-
compress_and_copy("static", "priv/static")
15-
compress_and_copy("iframe/priv/static/iframe", "priv/iframe_static")
10+
app_path = Mix.Project.app_path()
11+
12+
compress_and_copy("static", Path.join(app_path, "priv/static"))
13+
compress_and_copy("iframe/priv/static/iframe", Path.join(app_path, "priv/iframe_static"))
1614
end
1715

1816
defp compress_and_copy(source_dir, target_dir) do

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ defmodule Livebook.MixProject do
5959
"GitHub" => "https://github.com/livebook-dev/livebook"
6060
},
6161
files:
62-
~w(lib static priv/.gitkeep config mix.exs mix.lock README.md LICENSE CHANGELOG.md iframe/priv/static/iframe proto/lib)
62+
~w(lib static config mix.exs mix.lock README.md LICENSE CHANGELOG.md iframe/priv/static/iframe proto/lib)
6363
]
6464
end
6565

priv/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)