Skip to content

Commit

Permalink
fix: make metapac unmanaged output backends in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
ripytide committed Nov 14, 2024
1 parent f8e0f10 commit 31061b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 21 additions & 4 deletions src/backends/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,28 @@ macro_rules! package_ids {
($($backend:ident),*) => {
#[derive(Debug, Clone, Default, Serialize)]
#[allow(non_snake_case)]
#[serde(rename_all = "lowercase")]
pub struct PackageIds {
$(
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub $backend: BTreeSet<String>,
)*
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Arch: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Apt: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Brew: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Cargo: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Dnf: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Flatpak: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Pipx: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Rustup: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub WinGet: BTreeSet<String>,
#[serde(skip_serializing_if = "BTreeSet::is_empty")]
pub Xbps: BTreeSet<String>,
}
impl PackageIds {
append!($($backend),*);
Expand Down

0 comments on commit 31061b7

Please sign in to comment.