update veet

This commit is contained in:
Harivansh Rathi 2025-12-14 17:18:11 -05:00
parent c548626d7f
commit 574d9038e5
3 changed files with 40 additions and 0 deletions

View file

@ -163,5 +163,43 @@ def problems_dir() -> None:
typer.echo(repo / "problems")
@app.command()
def update() -> None:
"""Update veetcode to the latest version."""
import subprocess
repo = find_repo_root()
typer.echo(f"Updating veetcode in {repo}...")
# Git pull
result = subprocess.run(
["git", "pull"],
cwd=repo,
capture_output=True,
text=True
)
if result.returncode != 0:
typer.echo(f"Git pull failed: {result.stderr}")
raise typer.Exit(1)
typer.echo(result.stdout.strip())
# Sync dependencies
typer.echo("Syncing dependencies...")
result = subprocess.run(
["uv", "sync"],
cwd=repo,
capture_output=True,
text=True
)
if result.returncode != 0:
typer.echo(f"uv sync failed: {result.stderr}")
raise typer.Exit(1)
typer.echo("✓ veetcode updated!")
if __name__ == "__main__":
app()