mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-04-14 00:00:07 +08:00
Do not symlink priv (#2965)
This commit is contained in:
parent
628272e8e1
commit
64b10e055f
5 changed files with 5 additions and 12 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -33,7 +33,3 @@ npm-debug.log
|
|||
|
||||
# The built Escript
|
||||
/livebook
|
||||
|
||||
# We generate priv when building release or escript
|
||||
/priv/static
|
||||
/priv/iframe_static
|
||||
|
|
|
@ -57,7 +57,6 @@ COPY config config
|
|||
RUN mix do deps.get, deps.compile
|
||||
|
||||
# Compile and build the release
|
||||
COPY priv/.gitkeep priv/.gitkeep
|
||||
COPY rel rel
|
||||
COPY static static
|
||||
COPY iframe/priv/static/iframe iframe/priv/static/iframe
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
defmodule Mix.Tasks.Livebook.GenPriv do
|
||||
@moduledoc false
|
||||
|
||||
# Note that we need to include priv/.gitkeep in Dockerfile and Hex
|
||||
# package files, so that priv/ is symlinked within _build/, before
|
||||
# we generate the actual files.
|
||||
|
||||
use Mix.Task
|
||||
|
||||
@gzippable_exts ~w(.js .css .txt .text .html .json .svg .eot .ttf)
|
||||
|
||||
@impl true
|
||||
def run([]) do
|
||||
compress_and_copy("static", "priv/static")
|
||||
compress_and_copy("iframe/priv/static/iframe", "priv/iframe_static")
|
||||
app_path = Mix.Project.app_path()
|
||||
|
||||
compress_and_copy("static", Path.join(app_path, "priv/static"))
|
||||
compress_and_copy("iframe/priv/static/iframe", Path.join(app_path, "priv/iframe_static"))
|
||||
end
|
||||
|
||||
defp compress_and_copy(source_dir, target_dir) do
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -59,7 +59,7 @@ defmodule Livebook.MixProject do
|
|||
"GitHub" => "https://github.com/livebook-dev/livebook"
|
||||
},
|
||||
files:
|
||||
~w(lib static priv/.gitkeep config mix.exs mix.lock README.md LICENSE CHANGELOG.md iframe/priv/static/iframe proto/lib)
|
||||
~w(lib static config mix.exs mix.lock README.md LICENSE CHANGELOG.md iframe/priv/static/iframe proto/lib)
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue