diff --git a/xtask/src/commands/copy_lsp.rs b/xtask/src/commands/copy_lsp.rs index f0caf277..a28d32c6 100644 --- a/xtask/src/commands/copy_lsp.rs +++ b/xtask/src/commands/copy_lsp.rs @@ -1,4 +1,4 @@ -use xshell::Shell; +use xshell::{Shell, cmd}; const SRC: &str = "./target/debug/witcherscript-lsp.exe"; @@ -7,6 +7,9 @@ const DST: &str = "./editors/vscode/server/bin"; pub fn copy_lsp() -> anyhow::Result<()> { let sh = Shell::new()?; + println!("Building the LSP..."); + cmd!(sh, "cargo build --package witcherscript-lsp").run()?; + sh.copy_file(SRC, DST)?; println!("Copied debug LSP into {}", DST); diff --git a/xtask/src/commands/copy_lsp_release.rs b/xtask/src/commands/copy_lsp_release.rs index 43e81d8b..c0c81b24 100644 --- a/xtask/src/commands/copy_lsp_release.rs +++ b/xtask/src/commands/copy_lsp_release.rs @@ -1,4 +1,4 @@ -use xshell::Shell; +use xshell::{Shell, cmd}; const SRC: &str = "./target/release/witcherscript-lsp.exe"; @@ -7,6 +7,9 @@ const DST: &str = "./editors/vscode/server/bin"; pub fn copy_lsp_release() -> anyhow::Result<()> { let sh = Shell::new()?; + println!("Building the LSP..."); + cmd!(sh, "cargo build --package witcherscript-lsp --release").run()?; + sh.copy_file(SRC, DST)?; println!("Copied release LSP into {}", DST);