Skip to content

Commit

Permalink
Add pipxu step (topgrade-rs#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggdr authored Mar 4, 2025
1 parent b40bffb commit 368a060
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub enum Step {
PipReviewLocal,
Pipupgrade,
Pipx,
Pipxu,
Pixi,
Pkg,
Pkgin,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ fn run() -> Result<()> {
runner.execute(Step::Opam, "opam", || generic::run_opam_update(&ctx))?;
runner.execute(Step::Vcpkg, "vcpkg", || generic::run_vcpkg_update(&ctx))?;
runner.execute(Step::Pipx, "pipx", || generic::run_pipx_update(&ctx))?;
runner.execute(Step::Pipxu, "pipxu", || generic::run_pipxu_update(&ctx))?;
runner.execute(Step::Vscode, "Visual Studio Code extensions", || {
generic::run_vscode_extensions_update(&ctx)
})?;
Expand Down
10 changes: 10 additions & 0 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,16 @@ pub fn run_pipx_update(ctx: &ExecutionContext) -> Result<()> {
ctx.run_type().execute(pipx).args(command_args).status_checked()
}

pub fn run_pipxu_update(ctx: &ExecutionContext) -> Result<()> {
let pipxu = require("pipxu")?;
print_separator("pipxu");

ctx.run_type()
.execute(pipxu)
.args(["upgrade", "--all"])
.status_checked()
}

pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
let conda = require("conda")?;

Expand Down

0 comments on commit 368a060

Please sign in to comment.