From e21ef0ab0e749cd43a9f375a8bce653e5009d1c8 Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 25 Aug 2026 20:01:00 +0000 Subject: [PATCH] gitea workflow + xdg 3 fix --- {.github => .gitea}/workflows/ci.yml | 0 Cargo.toml | 16 ++++++++-------- src/main.rs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) rename {.github => .gitea}/workflows/ci.yml (100%) diff --git a/.github/workflows/ci.yml b/.gitea/workflows/ci.yml similarity index 100% rename from .github/workflows/ci.yml rename to .gitea/workflows/ci.yml diff --git a/Cargo.toml b/Cargo.toml index 92da267..9acdfe4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "slim" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] -anyhow = "1" -clap = { version = "4", features = ["derive"] } -flate2 = "1" -walkdir = "2" -cpio = "0.2" -xdg = "2" +anyhow = "1.0.104" +clap = { version = "4.6.6", features = ["derive"] } +flate2 = "1.1.9" +walkdir = "2.5.0" +cpio = "0.4.1" +xdg = "3.0.0" [dev-dependencies] -tempfile = "3" +tempfile = "3.27.0" diff --git a/src/main.rs b/src/main.rs index eaac44e..c768dc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,9 +43,9 @@ fn main() -> Result<()> { } fn registry_dir(image: &str) -> PathBuf { - let base = xdg::BaseDirectories::with_prefix("slim-rs").unwrap(); - base.place_data_file(format!("registry/{}/vmlinuz", image)).unwrap(); - base.place_data_file(format!("registry/{}/initrd", image)).unwrap().parent().unwrap().to_path_buf() + let base = xdg::BaseDirectories::with_prefix("slim-rs"); + let initrd_path = base.place_data_file(format!("registry/{}/initrd", image)); + initrd_path.unwrap().parent().unwrap().to_path_buf() } fn build(image: &str) -> Result<()> {