diff --git a/Cargo.lock b/Cargo.lock index 81282f1..dcbf979 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -873,14 +873,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1654,6 +1654,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "rand" version = "0.8.5" @@ -2177,7 +2183,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "television" -version = "0.10.9" +version = "0.10.10" dependencies = [ "anyhow", "base64", @@ -2233,7 +2239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" dependencies = [ "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", "rustix 1.0.2", "windows-sys 0.59.0", @@ -2545,7 +2551,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", ] [[package]] @@ -2589,9 +2595,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -2847,9 +2853,9 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags 2.9.0", ] diff --git a/Cargo.toml b/Cargo.toml index 28f970d..50a80cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "television" -version = "0.10.9" +version = "0.10.10" edition = "2021" description = "A cross-platform, fast and extensible general purpose fuzzy finder TUI." license = "MIT" @@ -21,6 +21,8 @@ include = [ "television/**", ".config/config.toml", "cable", + "build.rs", + "man", ] rust-version = "1.83" build = "build.rs" diff --git a/build.rs b/build.rs index e2034f2..670b51a 100644 --- a/build.rs +++ b/build.rs @@ -8,21 +8,24 @@ fn build_man_page() -> std::io::Result<()> { let out_dir = PathBuf::from( std::env::var_os("OUT_DIR").ok_or(std::io::ErrorKind::NotFound)?, ); - std::fs::create_dir_all(&out_dir)?; let cmd = Cli::command(); let man = clap_mangen::Man::new(cmd); let mut buffer = Vec::::default(); man.render(&mut buffer)?; - let out_path = out_dir.join("tv.1"); + let out_path = out_dir + .ancestors() + .nth(4) + .unwrap() + .join("assets") + .join("tv.1"); + std::fs::create_dir_all(out_path.parent().unwrap())?; std::fs::write(&out_path, &buffer)?; - eprintln!("Wrote man page to {out_path:?}"); - std::fs::write(PathBuf::from("./man").join("tv.1"), &buffer)?; - eprintln!("Wrote man page to ./man directory."); Ok(()) } fn main() { println!("cargo::rerun-if-changed=television/cli/args.rs"); + println!("cargo::rerun-if-changed=build.rs"); build_man_page().expect("Failed to generate man page."); }