Skip to content

Commit

Permalink
docs: prepare for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ripytide committed Nov 24, 2024
1 parent 7bfdde8 commit 714ecc7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.5] - 2024-11-24

## Added

- New backend: `snap` (#54) thanks @watzon!

## [0.2.4] - 2024-11-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ support for additional backends are welcome!
| `pacman`/`paru`/`pikaur`/`yay` | `[arch]` | see the `arch_package_manager` config |
| `apt` | `[apt]` | |
| `brew` | `[brew]` | |
| `cargo` | `[cargo]` | |
| `dnf` | `[dnf]` | |
| `flatpak` | `[flatpak]` | |
| `pipx` | `[pipx]` | |
| `cargo` | `[cargo]` | |
| `rustup` | `[rustup]` | |
| `snap` | `[snap]` | |
| `winget` | `[winget]` | |
Expand Down
25 changes: 12 additions & 13 deletions src/backends/snap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Backend for Snap {
}

let output = run_command_for_stdout(["snap", "list"], Perms::Same, false)?;

// Skip the first line which is the header
Ok(output
.lines()
Expand All @@ -44,7 +44,7 @@ impl Backend for Snap {

fn install_packages(
packages: &BTreeMap<String, Self::InstallOptions>,
_no_confirm: bool,
_: bool,
_: &Config,
) -> Result<()> {
if !packages.is_empty() {
Expand All @@ -59,7 +59,7 @@ impl Backend for Snap {
Ok(())
}

fn remove_packages(packages: &BTreeSet<String>, _no_confirm: bool, _: &Config) -> Result<()> {
fn remove_packages(packages: &BTreeSet<String>, _: bool, _: &Config) -> Result<()> {
if !packages.is_empty() {
run_command(
["snap", "remove"]
Expand All @@ -73,15 +73,14 @@ impl Backend for Snap {
}

fn version(_: &Config) -> Result<String> {
run_command_for_stdout(["snap", "--version"], Perms::Same, false)
.map(|output| {
output
.lines()
.next()
.unwrap_or_default()
.split_whitespace()
.collect::<Vec<_>>()
.join(" ")
})
run_command_for_stdout(["snap", "--version"], Perms::Same, false).map(|output| {
output
.lines()
.next()
.unwrap_or_default()
.split_whitespace()
.collect::<Vec<_>>()
.join(" ")
})
}
}
4 changes: 4 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ pub struct SyncCommand {
#[derive(Args)]
#[command(visible_alias("u"))]
/// show explicitly installed packages not managed by metapac
///
/// the output is in valid toml group file format to allow writing
/// the output to a file which can help in importing packages
/// installed on your system into your group files
pub struct UnmanagedCommand {}

#[derive(Args)]
Expand Down

0 comments on commit 714ecc7

Please sign in to comment.