Skip to content

Commit

Permalink
[ci] use || exit instead of if %errorlevel% neq 0 exit
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkos committed Aug 1, 2024
1 parent 9606547 commit f31c069
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions ci/github-actions/install-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ set DOWNLOAD_DIR_CMAKE=%DOWNLOAD_DIR:\=/%

echo Installing wget...

choco install wget --no-progress
if %errorlevel% neq 0 exit /b %errorlevel%
choco install wget --no-progress || exit

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Expand All @@ -30,8 +29,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
echo Downloading %RAGEL_DOWNLOAD_URL%...

mkdir %DOWNLOAD_DIR%
wget -nv %RAGEL_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\ragel.exe
if %errorlevel% neq 0 exit /b %errorlevel%
wget -nv %RAGEL_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\ragel.exe || exit

echo set(RAGEL_EXE %DOWNLOAD_DIR_CMAKE%/ragel.exe) >> paths.cmake

Expand All @@ -42,23 +40,17 @@ echo set(RAGEL_EXE %DOWNLOAD_DIR_CMAKE%/ragel.exe) >> paths.cmake
echo Downloading %LUA_DOWNLOAD_URL%...

mkdir %DOWNLOAD_DIR%\lua
wget -nv %LUA_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\lua\lua.zip
if %errorlevel% neq 0 exit /b %errorlevel%

7z x -y %DOWNLOAD_DIR%\lua\lua.zip
if %errorlevel% neq 0 exit /b %errorlevel%

ren Lua-%LUA_VERSION% lua
if %errorlevel% neq 0 exit /b %errorlevel%
wget -nv %LUA_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\lua\lua.zip || exit
7z x -y %DOWNLOAD_DIR%\lua\lua.zip || exit
ren Lua-%LUA_VERSION% lua || exit

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: OpenSSL

echo Installing OpenSSL %OPENSSL_VERSION%...

choco install openssl --version=%OPENSSL_VERSION% --no-progress -- %CHOCO_PLATFORM%
if %errorlevel% neq 0 exit /b %errorlevel%
choco install openssl --version=%OPENSSL_VERSION% --no-progress -- %CHOCO_PLATFORM% || exit

set OPENSSL_ROOT_DIR=C:/Program Files%PROGRAM_FILES_DIR_SUFFIX%/OpenSSL%OPENSSL_DIR_SUFFIX%

Expand All @@ -76,14 +68,9 @@ echo set(OPENSSL_SSL_DLL_NAME libssl%OPENSSL_DLL_SUFFIX%) >> paths.cmake

echo Downloading %LLVM_DOWNLOAD_URL%...

wget -nv %LLVM_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\%LLVM_DOWNLOAD_FILE%
if %errorlevel% neq 0 exit /b %errorlevel%

7z x -y %DOWNLOAD_DIR%\%LLVM_DOWNLOAD_FILE% -o%DOWNLOAD_DIR%
if %errorlevel% neq 0 exit /b %errorlevel%

ren %DOWNLOAD_DIR%\%LLVM_RELEASE_NAME% llvm
if %errorlevel% neq 0 exit /b %errorlevel%
wget -nv %LLVM_DOWNLOAD_URL% -O %DOWNLOAD_DIR%\%LLVM_DOWNLOAD_FILE% || exit
7z x -y %DOWNLOAD_DIR%\%LLVM_DOWNLOAD_FILE% -o%DOWNLOAD_DIR% || exit
ren %DOWNLOAD_DIR%\%LLVM_RELEASE_NAME% llvm || exit

perl %COMPARE_VERSIONS_PL% %LLVM_VERSION% 3.5
if %errorlevel% == -1 goto llvm34x
Expand Down

0 comments on commit f31c069

Please sign in to comment.