Fix PECL publish and windows CI (#85)

This commit is contained in:
Dengke Tang
2023-03-01 14:56:36 -08:00
committed by GitHub
parent 56009e8c03
commit 442f3850bd
20 changed files with 396 additions and 244 deletions
+31
View File
@@ -0,0 +1,31 @@
@echo on
setlocal
set "PHP_BINARY=php"
if not "%~1"=="" (
set "PHP_BINARY=%~1"
)
set "script_dir=%~dp0"
set "work_dir=%script_dir%/.."
cd %work_dir%
set vendor_path=vendor
REM Run command to get composer_dir
set "composer_dir="
for /f "usebackq delims=" %%i in (`where composer.phar`) do set "composer_dir=%%i"
if not exist "%vendor_path%" (
REM Check if composer_dir was found
if "%composer_dir%"=="" (
echo No composer found.
exit /b 1
)
call %PHP_BINARY% -c php-win.ini %composer_dir% update
)
call %PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug
endlocal