try this out

This commit is contained in:
Dengke Tang
2023-02-27 15:37:45 -08:00
parent 8e7e2f7c99
commit 4b7eafa14c
2 changed files with 49 additions and 57 deletions
+7 -15
View File
@@ -8,25 +8,17 @@ if not "%~1"=="" (
set "PHP_BINARY=%~1"
)
REM Check if composer_dir was found
if "%composer_dir%"=="" (
echo No composer found.
exit /b 1
)
set "script_dir=%~dp0"
set "work_dir=%script_dir%/.."
cd %work_dir%
set vendor_path=vendor
if not exist "%vendor_path%" (
REM Run command to get composer_dir
set "composer_dir="
for /f "usebackq delims=" %%i in (`where composer.phar`) do set "composer_dir=%%i"
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
composer update
call %PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug
endlocal