Skip to content

Commit 601b2b8

Browse files
morambrocopybara-github
authored andcommitted
Fix the release script for GCP Windows
- Correctly propagate the error from the routine to the caller - Add Python 3.12 support PiperOrigin-RevId: 629379918 Change-Id: I64b45fc0afe1b2781508060a76141d36bb26abab
1 parent 1842093 commit 601b2b8

File tree

1 file changed

+35
-22
lines changed
  • kokoro/gcp_windows/release/bdist/create

1 file changed

+35
-22
lines changed

kokoro/gcp_windows/release/bdist/create/run.bat

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,20 @@ SET TINK_PYTHON_ROOT_PATH=%cd%
3737
CALL :UsePython "3.8.10" "38" || GOTO :Error
3838
CALL :BuildAndInstallWheel || GOTO :Error
3939
CALL :RunTests || GOTO :Error
40-
@REM Build wheels for 3.9 and 3.10 only on release jobs.
41-
ECHO %KOKORO_JOB_NAME% | FINDSTR "github" | FINDSTR "release"
42-
IF %errorlevel% EQU 0 (
43-
CALL :UsePython "3.9.13" "39" || GOTO :Error
44-
CALL :BuildAndInstallWheel || GOTO :Error
45-
CALL :RunTests || GOTO :Error
46-
CALL :UsePython "3.10.11" "310" || GOTO :Error
47-
CALL :BuildAndInstallWheel || GOTO :Error
48-
CALL :RunTests || GOTO :Error
49-
)
50-
CALL :UsePython "3.11.7" "311" || GOTO :Error
40+
41+
CALL :UsePython "3.9.13" "39" || GOTO :Error
42+
CALL :BuildAndInstallWheel || GOTO :Error
43+
CALL :RunTests || GOTO :Error
44+
45+
CALL :UsePython "3.10.11" "310" || GOTO :Error
46+
CALL :BuildAndInstallWheel || GOTO :Error
47+
CALL :RunTests || GOTO :Error
48+
49+
CALL :UsePython "3.11.9" "311" || GOTO :Error
50+
CALL :BuildAndInstallWheel || GOTO :Error
51+
CALL :RunTests || GOTO :Error
52+
53+
CALL :UsePython "3.12.3" "312" || GOTO :Error
5154
CALL :BuildAndInstallWheel || GOTO :Error
5255
CALL :RunTests || GOTO :Error
5356

@@ -61,23 +64,33 @@ GOTO :End
6164
@REM
6265
@REM TODO(b/265261481): Derive cp from version.
6366
:UsePython
64-
choco install -my --no-progress --allow-downgrade python ^
65-
--version=%~1% || EXIT /B %errorlevel%
67+
choco install -my --no-progress --allow-downgrade python --version=%~1%
68+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
69+
6670
SET PATH=C:\Python%~2\;C:\Python%~2\Scripts;%OLD_PATH%
6771
python -m pip install --no-deps --require-hashes -r ^
68-
tools\distribution\requirements.txt || EXIT /B %errorlevel%
69-
python -m pip install --no-deps --require-hashes ^
70-
-r requirements.txt || EXIT /B %errorlevel%
71-
python -m pip install --upgrade delvewheel || EXIT /B %errorlevel%
72+
tools\distribution\requirements.txt
73+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
74+
75+
python -m pip install --no-deps --require-hashes -r requirements.txt
76+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
77+
78+
python -m pip install --upgrade delvewheel
79+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
80+
7281
SET OUT_WHEEL=tink-%TINK_VERSION%-cp%~2-cp%~2-win_amd64.whl
7382
EXIT /B 0
7483

75-
@REM Builds and repairs the binary wheel, and places it in release/.
84+
@REM Builds repairs and installs the binary wheel, and places it in release/.
7685
:BuildAndInstallWheel
77-
python -m pip wheel . || EXIT /B %errorlevel%
78-
python -m delvewheel repair %OUT_WHEEL% -w release || EXIT /B %errorlevel%
79-
python -m pip install --no-deps release/%OUT_WHEEL% || EXIT /B %errorlevel%
80-
EXIT /B 0
86+
python -m pip wheel .
87+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
88+
89+
python -m delvewheel repair %OUT_WHEEL% -w release
90+
IF %errorlevel% neq 0 EXIT /B %errorlevel%
91+
92+
python -m pip install --no-deps release/%OUT_WHEEL%
93+
EXIT /B %errorlevel%
8194

8295
:RunTests
8396
SET RET_VALUE=0

0 commit comments

Comments
 (0)