[PATCH] D135138: Detect errors in Windows packaging script

Pierrick Bouvier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 03:41:20 PDT 2022


pbo-linaro created this revision.
Herald added a project: All.
pbo-linaro requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135138

Files:
  llvm/utils/release/build_llvm_release.bat


Index: llvm/utils/release/build_llvm_release.bat
===================================================================
--- llvm/utils/release/build_llvm_release.bat
+++ 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 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 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 @@
 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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135138.464938.patch
Type: text/x-patch
Size: 1382 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221004/24b93c99/attachment.bin>


More information about the llvm-commits mailing list