[llvm] 44073d3 - Detect errors in Windows packaging script

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 06:23:22 PDT 2022


Author: Pierrick Bouvier
Date: 2022-10-04T15:22:36+02:00
New Revision: 44073d319d360de3e9bb1a6f4491af5fae19c4c9

URL: https://github.com/llvm/llvm-project/commit/44073d319d360de3e9bb1a6f4491af5fae19c4c9
DIFF: https://github.com/llvm/llvm-project/commit/44073d319d360de3e9bb1a6f4491af5fae19c4c9.diff

LOG: Detect errors in Windows packaging script

- Detect VS devcmd error (missing VS)
- Detect missing python install
- Show commands executed
- Removed pause (blocking CI usage)

Differential revision: https://reviews.llvm.org/D135138

Added: 
    

Modified: 
    llvm/utils/release/build_llvm_release.bat

Removed: 
    


################################################################################
diff  --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index d0e3256cdd4fe..8fb1f023d1100 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -1,4 +1,4 @@
- at echo off
+ at echo on
 setlocal enabledelayedexpansion
 
 if "%1"=="" goto usage
@@ -66,14 +66,13 @@ echo Revision: %revision%
 echo Package version: %package_version%
 echo Build dir: %build_dir%
 echo.
-pause
 
 if exist %build_dir% (
   echo Build directory already exists: %build_dir%
   exit /b 1
 )
 mkdir %build_dir%
-cd %build_dir%
+cd %build_dir% || exit /b 1
 
 echo Checking out %revision%
 curl -L https://github.com/llvm/llvm-project/archive/%revision%.zip -o src.zip || exit /b 1
@@ -122,9 +121,11 @@ REM TODO: Run the "check-all" tests.
 REM Set Python environment
 set PYTHONHOME=%python32_dir%
 set PATH=%PYTHONHOME%;%PATH%
+%python32_dir%/python.exe --version || exit /b 1
 
 set "VSCMD_START_DIR=%build_dir%"
-call "%vsdevcmd%" -arch=x86
+call "%vsdevcmd%" -arch=x86 || exit /b 1
+ at echo on
 mkdir build32_stage0
 cd build32_stage0
 
@@ -191,9 +192,11 @@ set PATH=%OLDPATH%
 REM Set Python environment
 set PYTHONHOME=%python64_dir%
 set PATH=%PYTHONHOME%;%PATH%
+%python64_dir%/python.exe --version || exit /b 1
 
 set "VSCMD_START_DIR=%build_dir%"
-call "%vsdevcmd%" -arch=amd64
+call "%vsdevcmd%" -arch=amd64 || exit /b 1
+ at echo on
 mkdir build64_stage0
 cd build64_stage0
 


        


More information about the llvm-commits mailing list