Skip to content

Commit

Permalink
xtask: build before copying lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed Jan 19, 2024
1 parent 564d23b commit cfd9eef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion xtask/src/commands/copy_lsp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use xshell::Shell;
use xshell::{Shell, cmd};


const SRC: &str = "./target/debug/witcherscript-lsp.exe";
Expand All @@ -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);

Expand Down
5 changes: 4 additions & 1 deletion xtask/src/commands/copy_lsp_release.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use xshell::Shell;
use xshell::{Shell, cmd};


const SRC: &str = "./target/release/witcherscript-lsp.exe";
Expand All @@ -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);

Expand Down

0 comments on commit cfd9eef

Please sign in to comment.