Skip to content

Commit afdf9ba

Browse files
dmitriplotnikovcopybara-github
authored andcommitted
Fix Kokoro Windows build/release script failures and linux release copy
- In release_windows.bat and build_windows.bat, replace the 'timeout' command with a 'ping'-based sleep workaround to prevent crashes in non-interactive Kokoro environments. - In build_release_linux.sh, copy release files recursively to ensure all nested files are included correctly. PiperOrigin-RevId: 922252381
1 parent 7e52b33 commit afdf9ba

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

release/kokoro/build_windows.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ if !FETCH_STATUS! NEQ 0 (
5050
if !ERRORLEVEL! EQU 0 (
5151
if !ATTEMPTS! LSS %FETCH_RETRIES% (
5252
echo Fetch failed with timeout. Retrying in %FETCH_RETRY_DELAY_S% seconds...
53-
timeout /t %FETCH_RETRY_DELAY_S% /nobreak >nul
53+
:: Use ping instead of timeout because timeout command fails in non-interactive Kokoro environments
54+
:: with "ERROR: Input redirection is not supported, exiting the process immediately."
55+
set /a PINGS=%FETCH_RETRY_DELAY_S%+1
56+
ping -n !PINGS! 127.0.0.1 >nul
5457
goto fetch_loop
5558
)
5659
)

release/kokoro/release_windows.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ if !FETCH_STATUS! NEQ 0 (
135135
if !ERRORLEVEL! EQU 0 (
136136
if !ATTEMPTS! LSS %FETCH_RETRIES% (
137137
echo Fetch failed with timeout. Retrying in %FETCH_RETRY_DELAY_S% seconds...
138-
timeout /t %FETCH_RETRY_DELAY_S% /nobreak >nul
138+
:: Use ping instead of timeout because timeout command fails in non-interactive Kokoro environments
139+
:: with "ERROR: Input redirection is not supported, exiting the process immediately."
140+
set /a PINGS=%FETCH_RETRY_DELAY_S%+1
141+
ping -n !PINGS! 127.0.0.1 >nul
139142
goto fetch_loop
140143
)
141144
)

0 commit comments

Comments
 (0)