From 621398f5cda470c2e5b64501fa9da64719473aea Mon Sep 17 00:00:00 2001 From: Naman Garg Date: Sat, 30 Mar 2024 19:59:22 +0530 Subject: [PATCH 1/3] Fix pacman support for resource resolver --- crates/resource-resolver/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/resource-resolver/src/lib.rs b/crates/resource-resolver/src/lib.rs index 8a7377f1..a3b21975 100644 --- a/crates/resource-resolver/src/lib.rs +++ b/crates/resource-resolver/src/lib.rs @@ -64,6 +64,8 @@ pub fn current_format() -> crate::Result { Ok(PackageFormat::Deb) } else if cfg!(CARGO_PACKAGER_FORMAT = "appimage") { Ok(PackageFormat::AppImage) + } else if cfg!(CARGO_PACKAGER_FORMAT = "pacman") { + Ok(PackageFormat::Pacman) } else { Err(Error::UnkownPackageFormat) } @@ -94,7 +96,7 @@ pub fn resources_dir(package_format: PackageFormat) -> Result { .ok_or_else(|| Error::ParentNotFound(exe.clone()))?; Ok(exe_dir.to_path_buf()) } - PackageFormat::Deb => { + PackageFormat::Deb | PackageFormat::Pacman => { let exe = current_exe()?; let exe_name = exe.file_name().unwrap().to_string_lossy(); From 6a5b33c4cec33724d61e7e8125bac2e3daf55da3 Mon Sep 17 00:00:00 2001 From: Naman Garg Date: Sat, 30 Mar 2024 21:49:11 +0530 Subject: [PATCH 2/3] Add changes file --- .changes/add-pacman-support-resource-resolver.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/add-pacman-support-resource-resolver.md diff --git a/.changes/add-pacman-support-resource-resolver.md b/.changes/add-pacman-support-resource-resolver.md new file mode 100644 index 00000000..2ea7aadc --- /dev/null +++ b/.changes/add-pacman-support-resource-resolver.md @@ -0,0 +1,5 @@ +--- +"cargo-packager-resource-resolver" : patch +--- + +Added support for Pacman Packages in the Resource Resolver. From 6deb2f551a79db8e8f79c28aae2cacc65998c4d9 Mon Sep 17 00:00:00 2001 From: Naman Garg Date: Sat, 30 Mar 2024 21:53:37 +0530 Subject: [PATCH 3/3] Run prettier --- .changes/add-pacman-support-resource-resolver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/add-pacman-support-resource-resolver.md b/.changes/add-pacman-support-resource-resolver.md index 2ea7aadc..9cb6617b 100644 --- a/.changes/add-pacman-support-resource-resolver.md +++ b/.changes/add-pacman-support-resource-resolver.md @@ -1,5 +1,5 @@ --- -"cargo-packager-resource-resolver" : patch +"cargo-packager-resource-resolver": patch --- Added support for Pacman Packages in the Resource Resolver.