Skip to content

Commit 5809730

Browse files
committed
fix: add a step to the update-demo script to ensure python is pinned correctly, installed, and synced when changed
1 parent c1e4b3a commit 5809730

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/update-demo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33
from pathlib import Path
44
from typing import Annotated
5-
from typing import Any
65

76
import cruft
87
import typer
@@ -13,6 +12,7 @@
1312
from util import FolderOption
1413
from util import REPO_FOLDER
1514
from util import require_clean_and_up_to_date_repo
15+
from util import uv
1616

1717

1818
cli: typer.Typer = typer.Typer()
@@ -34,6 +34,8 @@ def update_demo(
3434
with work_in(demo_path):
3535
require_clean_and_up_to_date_repo()
3636
git("checkout", develop_branch)
37+
uv("python", "pin", min_python_version)
38+
uv("python", "install", min_python_version)
3739
cruft.update(
3840
project_dir=demo_path,
3941
template_path=REPO_FOLDER,
@@ -44,6 +46,7 @@ def update_demo(
4446
"max_python_version": max_python_version
4547
},
4648
)
49+
uv("sync", "--all-groups")
4750
git("add", ".")
4851
git("commit", "-m", "chore: update demo to the latest cookiecutter-robust-python", "--no-verify")
4952
git("push")

0 commit comments

Comments
 (0)