diff --git a/copier-template/app.cmd.jinja b/copier-template/app.cmd.jinja index c8a0abe..a3e4c87 100644 --- a/copier-template/app.cmd.jinja +++ b/copier-template/app.cmd.jinja @@ -22,8 +22,18 @@ if "%COMMAND%"=="-h" goto help if "%COMMAND%"=="--help" goto help if "%COMMAND%"=="install" goto install if "%COMMAND%"=="framework-sync" goto framework_sync -if "%COMMAND%"=="template-check" goto template_check -if "%COMMAND%"=="template-update" goto template_update +if "%COMMAND%"=="template-check" ( + call uvx copier update --defaults --pretend --vcs-ref HEAD "%ROOT_DIR%" + set "EXIT_CODE=!ERRORLEVEL!" + popd >nul + exit /b !EXIT_CODE! +) +if "%COMMAND%"=="template-update" ( + call uvx copier update --defaults --vcs-ref HEAD "%ROOT_DIR%" + set "EXIT_CODE=!ERRORLEVEL!" + popd >nul + exit /b !EXIT_CODE! +) if "%COMMAND%"=="test" goto test if "%COMMAND%"=="serve" goto serve if "%COMMAND%"=="migrate" goto migrate @@ -84,14 +94,6 @@ goto end uv sync --extra dev --upgrade-package iti-flask{% if include_system %} --upgrade-package iti-system{% endif %} goto end -:template_check -uvx copier update --defaults --pretend --vcs-ref HEAD "%ROOT_DIR%" -goto end - -:template_update -uvx copier update --defaults --vcs-ref HEAD "%ROOT_DIR%" -goto end - :test uv run --extra dev pytest -q goto end diff --git a/copier-template/app.sh.jinja b/copier-template/app.sh.jinja index 8f9dc32..c8ab447 100644 --- a/copier-template/app.sh.jinja +++ b/copier-template/app.sh.jinja @@ -63,10 +63,10 @@ case "$command" in uv sync --extra dev --upgrade-package iti-flask{% if include_system %} --upgrade-package iti-system{% endif %} ;; template-check) - uvx copier update --defaults --pretend --vcs-ref HEAD "$ROOT_DIR" + exec uvx copier update --defaults --pretend --vcs-ref HEAD "$ROOT_DIR" ;; template-update) - uvx copier update --defaults --vcs-ref HEAD "$ROOT_DIR" + exec uvx copier update --defaults --vcs-ref HEAD "$ROOT_DIR" ;; test) uv run --extra dev pytest -q