Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make metapac unmanaged output backends in lowercase
Browse files Browse the repository at this point in the history
ripytide committed Nov 14, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent f8e0f10 commit 3eb7e23
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
### Fixed

- Fixed WinGet Command not working (#49)
- Fixed `metapac unmanaged` output backend names in lowercase (#49)

## [0.2.2] - 2024-11-10

22 changes: 14 additions & 8 deletions src/backends/all.rs
Original file line number Diff line number Diff line change
@@ -70,16 +70,22 @@ macro_rules! raw_package_ids {
}
apply_public_backends!(raw_package_ids);

#[derive(Debug, Clone, Default, Serialize)]
#[serde(rename_all(serialize = "lowercase", deserialize = "lowercase"))]
pub struct PackageIds {
pub Arch: BTreeSet<String>,
pub Apt: BTreeSet<String>,
pub Brew: BTreeSet<String>,
pub Cargo: BTreeSet<String>,
pub Dnf: BTreeSet<String>,
pub Flatpak: BTreeSet<String>,
pub Pipx: BTreeSet<String>,
pub Rustup: BTreeSet<String>,
pub WinGet: BTreeSet<String>,
pub Xbps: BTreeSet<String>,
}
macro_rules! package_ids {
($($backend:ident),*) => {
#[derive(Debug, Clone, Default, Serialize)]
#[allow(non_snake_case)]
pub struct PackageIds {
$(
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub $backend: BTreeSet<String>,
)*
}
impl PackageIds {
append!($($backend),*);
is_empty!($($backend),*);

0 comments on commit 3eb7e23

Please sign in to comment.