case 4690 - build-release.bat: copy all output to build-output.txt; UTF-8 for MkDocs when piped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 11:37:29 -07:00
parent cc2ccec9b1
commit a223a2bc65
3 changed files with 13 additions and 2 deletions

View File

@@ -1,3 +1,13 @@
@rem Runs itself again with --logged so all output also goes to build-output.txt beside this script (overwritten each build, not in git)
@if /i "%~1"=="--logged" goto LOGGED
@powershell -NoProfile -ExecutionPolicy Bypass -Command "[Console]::OutputEncoding = [Text.Encoding]::UTF8; cmd /c '%~f0' --logged '2>&1' | Tee-Object -FilePath '%~dp0build-output.txt'"
@pause
@exit /b
:LOGGED
@chcp 65001 >nul
rem mkdocs-material prints a warning banner MkDocs cannot write to a pipe without UTF-8
set PYTHONUTF8=1
set m=Unknown error
@echo ****************** CLEAN ALL OUTPUT FOLDERS **********
@@ -158,7 +168,7 @@ echo.
echo.
echo Error:
echo %m%
pause
rem the outer run pauses once the log is complete
goto DONE
::------------------------
@@ -169,7 +179,6 @@ echo.
echo.
echo.
@echo Completed without error
pause
:DONE