i feel like when build is explicit the user doesn't care if there's no changes

This commit is contained in:
abbie 2023-08-10 12:33:09 +01:00
parent 18f498bb77
commit 9857c2d892
Signed by: threeoh6000
GPG key ID: 801FE4AD456E922C
3 changed files with 2 additions and 10 deletions

View file

@ -1 +1 @@
2 3

View file

@ -1,6 +1,6 @@
[package] [package]
name = "curze" name = "curze"
version = "0.3.2" version = "0.3.3"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -193,14 +193,6 @@ fn build_package(package: String) {
return; return;
} }
if Path::new(&format!("{}/.local/share/curze/{}.version", home, realised_name)).exists() {
let package_version = fs::read_to_string(format!("{}/.local/share/curze/cache/{}/.curze/version", home, realised_name)).unwrap_or("4294967295".to_string()).parse::<u32>().unwrap_or(4294967295);
let installed_version = fs::read_to_string(format!("{}/.local/share/curze/{}.version", home, realised_name)).unwrap_or("4294967295".to_string()).parse::<u32>().unwrap_or(4294967295);
if package_version == installed_version || installed_version > package_version {
println!("NOTE: No updates, build halted.");
return;
}
}
if Path::new(&format!("{}/.local/share/curze/cache/{}/.curze/build.sh", home, realised_name)).exists() { if Path::new(&format!("{}/.local/share/curze/cache/{}/.curze/build.sh", home, realised_name)).exists() {
println!("NOTE: Building {}.", package); println!("NOTE: Building {}.", package);
let result_of_build = Command::new("sh") let result_of_build = Command::new("sh")