TEMPLATES_REF for template development

This commit is contained in:
hh
2026-09-08 20:40:21 +02:00
parent 40103e9bef
commit c31f0b241f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import questionary
from copier import run_copy, run_update
SOURCE = os.environ.get("TEMPLATES_DIR", "https://git.kotikot.com/templates")
REF = os.environ.get("TEMPLATES_REF")
BACKENDS = {"python": "backend-python"}
FRONTENDS = {"svelte": "frontend-svelte"}
SERVE = ["bun", "static", "api"]
@@ -72,7 +73,7 @@ def new(args: argparse.Namespace) -> None:
routes = [r for r, ok in (("api", backend), ("frontend", frontend and serve != "api")) if ok]
def copy(name: str, data: dict) -> None:
run_copy(template(name), dest, data=data, unsafe=True, defaults=args.defaults)
run_copy(template(name), dest, data=data, unsafe=True, defaults=args.defaults, vcs_ref=REF)
dest.mkdir(parents=True, exist_ok=True)
copy("infra", {"layout": "single" if single else "parts", "parts": [] if single else stack})