Skip to content

Commit

Permalink
feat: support Poetry (topgrade-rs#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored Jul 7, 2024
1 parent a9f57d4 commit 960b14f
Show file tree
Hide file tree
Showing 3 changed files with 8 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 @@ -125,6 +125,7 @@ pub enum Step {
Pkgin,
PlatformioCore,
Pnpm,
Poetry,
Powershell,
Protonup,
Pyenv,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ fn run() -> Result<()> {
runner.execute(Step::Lensfun, "Lensfun's database update", || {
generic::run_lensfun_update_data(&ctx)
})?;
runner.execute(Step::Poetry, "Poetry", || generic::run_poetry(&ctx))?;

if should_run_powershell {
runner.execute(Step::Powershell, "Powershell Modules Update", || {
Expand Down
6 changes: 6 additions & 0 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,3 +1002,9 @@ pub fn run_lensfun_update_data(ctx: &ExecutionContext) -> Result<()> {
.status_checked_with_codes(&[EXIT_CODE_WHEN_NO_UPDATE])
}
}

pub fn run_poetry(ctx: &ExecutionContext) -> Result<()> {
let poetry = require("poetry")?;
print_separator("Poetry");
ctx.run_type().execute(poetry).args(["self", "update"]).status_checked()
}

0 comments on commit 960b14f

Please sign in to comment.