Skip to content

Commit

Permalink
[suiop][pulumi] handle non-poetry projects (#20751)
Browse files Browse the repository at this point in the history
## Description 

Some projects don't use poetry

## Test plan 

Ran locally successfully on the services dir, which includes non-poetry
python projects.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
after-ephemera authored Dec 31, 2024
1 parent 04a5869 commit 02ce40e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/suiop-cli/src/cli/pulumi/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ fn update_dependencies(path: &Path, runtime: &str) -> Result<()> {
let output = match runtime {
"go" => run_cmd(vec!["go", "get", "-u"], Some(cmd_opts.clone()))
.and_then(|_o| run_cmd(vec!["go", "mod", "tidy"], Some(cmd_opts))),
"python" => run_cmd(vec!["poetry", "update"], Some(cmd_opts)),
"python" => {
if !path.join("pyproject.toml").exists() {
run_cmd(vec!["pulumi", "install"], Some(cmd_opts))
} else {
run_cmd(vec!["poetry", "update"], Some(cmd_opts))
}
}
"typescript" => run_cmd(vec!["pnpm", "update"], Some(cmd_opts)),
_ => unreachable!(),
}?;
Expand Down

0 comments on commit 02ce40e

Please sign in to comment.