feat: support Poetry (#790)

This commit is contained in:
SteveLauC
2024-07-07 10:37:07 +08:00
committed by GitHub
parent a9f57d4205
commit 960b14fa20
3 changed files with 8 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ pub enum Step {
Pkgin, Pkgin,
PlatformioCore, PlatformioCore,
Pnpm, Pnpm,
Poetry,
Powershell, Powershell,
Protonup, Protonup,
Pyenv, Pyenv,

View File

@@ -415,6 +415,7 @@ fn run() -> Result<()> {
runner.execute(Step::Lensfun, "Lensfun's database update", || { runner.execute(Step::Lensfun, "Lensfun's database update", || {
generic::run_lensfun_update_data(&ctx) generic::run_lensfun_update_data(&ctx)
})?; })?;
runner.execute(Step::Poetry, "Poetry", || generic::run_poetry(&ctx))?;
if should_run_powershell { if should_run_powershell {
runner.execute(Step::Powershell, "Powershell Modules Update", || { runner.execute(Step::Powershell, "Powershell Modules Update", || {

View File

@@ -1002,3 +1002,9 @@ pub fn run_lensfun_update_data(ctx: &ExecutionContext) -> Result<()> {
.status_checked_with_codes(&[EXIT_CODE_WHEN_NO_UPDATE]) .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()
}