Skip to content

Commit 435a958

Browse files
committed
Add missing build steps to update-elixir-ls.sh
1 parent cea20c0 commit 435a958

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

config/elixir/update-elixir-ls.sh

+21-2
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,41 @@ function elixirls_update() {
2525

2626
local download_url="https://github.com/elixir-lsp/elixir-ls/releases/download/${elixirls_version}/elixir-ls.zip"
2727
local download_prefix="$(mktemp -d)"
28-
local elixirls_dir="${download_prefix}/elixir-ls-release"
28+
local elixirls_dir="${download_prefix}/elixir-ls"
29+
local elixirls_release_dir="${download_prefix}/elixir-ls-release"
2930

3031
wget -P "${download_prefix}" "${download_url}"
3132

3233
if [ "$(md5 -q ${download_prefix}/elixir-ls.zip)" != "${elixirls_payload_md5}" ] >/dev/null 2>&1; then
3334
echo "Aborting operation - download hash is different."
3435
else
36+
local cwd="$(pwd)"
37+
3538
mkdir -p "${elixirls_dir}"
3639
unzip -d "${elixirls_dir}" "${download_prefix}/elixir-ls.zip"
40+
41+
echo "Rebuilding ElixirLS..."
42+
43+
cd "${elixirls_dir}"
44+
mix deps.get
45+
46+
mkdir -p "${elixirls_release_dir}"
47+
mix elixir_ls.release -o "${elixirls_release_dir}"
48+
3749
rm -fR "${extension_elixirls_dir}"
38-
mv "${elixirls_dir}" "${extension_dir}"
50+
mv "${elixirls_release_dir}" "${extension_dir}"
51+
52+
rm -fR "${extension_dir}/.elixir_ls"
53+
54+
echo "Operation completed."
55+
cd $cwd
3956
fi
4057

4158
# Clean up
4259
rm -fR "${download_prefix}"
60+
4361
fi
62+
4463
}
4564

4665
elixirls_update

0 commit comments

Comments
 (0)