build(actually reinstall updated plugins)
This commit is contained in:
parent
683c152fa2
commit
1acff8916f
1 changed files with 11 additions and 1 deletions
12
build.rs
12
build.rs
|
|
@ -1,5 +1,5 @@
|
|||
use directories_next::ProjectDirs;
|
||||
use std::fs;
|
||||
use std::{ffi::OsStr, fs};
|
||||
use structopt::clap::Shell;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
|
|
@ -24,11 +24,21 @@ fn main() {
|
|||
clap_app.gen_completions(BIN_NAME, Shell::Fish, &out_dir);
|
||||
|
||||
// Clear Default Plugins and Layouts
|
||||
|
||||
// Rerun on layout change
|
||||
for entry in WalkDir::new("assets/layouts") {
|
||||
let entry = entry.unwrap();
|
||||
println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy());
|
||||
}
|
||||
|
||||
// Rerun on plugin change
|
||||
for entry in WalkDir::new("target") {
|
||||
let entry = entry.unwrap();
|
||||
if entry.path().extension() == Some(OsStr::new("wasm")) {
|
||||
println!("cargo:rerun-if-changed={}", entry.path().to_string_lossy());
|
||||
}
|
||||
}
|
||||
|
||||
let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
|
||||
let data_dir = project_dirs.data_dir();
|
||||
drop(fs::remove_file(data_dir.join("plugins/status-bar.wasm")));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue