diff --git a/robo b/robo new file mode 100755 index 0000000..ab928f7 --- /dev/null +++ b/robo @@ -0,0 +1,6 @@ +#! /bin/sh +base=`dirname "$0"` +roboCommand="$1" + +shift +"$base/vendor/bin/robo" "$roboCommand" -- $* \ No newline at end of file diff --git a/robo.bat b/robo.bat new file mode 100644 index 0000000..f0c1de4 --- /dev/null +++ b/robo.bat @@ -0,0 +1,17 @@ +@echo off +setlocal +set base=%~dp0 +set roboCommand=%1 + +rem get all arguments except the first +shift +set "args=" +:parse +if "%~1" neq "" ( + set args=%args% %1 + shift + goto :parse +) +if defined args set args=%args:~1% + +call "%base%vendor\bin\robo" "%roboCommand%" -- %args% \ No newline at end of file diff --git a/tests/test b/tests/test deleted file mode 100755 index fcc01ae..0000000 --- a/tests/test +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh -base=`dirname "$0"` -php -n -S localhost:8000 "$base/server.php" >/dev/null 2>/dev/null & -sleep 1s -"$base/../vendor/bin/phpunit" -c "$base/phpunit.xml" $* -sleep 1s -pid=`lsof -n -i:8000 | grep -Eo "php\s+[0-9]+" | grep -Eo "[0-9]+"` -kill $pid \ No newline at end of file diff --git a/tests/test.bat b/tests/test.bat deleted file mode 100644 index 5d22caf..0000000 --- a/tests/test.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -setlocal -set base=%~dp0 -start /b php -n -S localhost:8000 "%base%server.php" >nul 2>nul -timeout /nobreak /t 1 >nul -call "%base%..\vendor\bin\phpunit" -c "%base%phpunit.xml" %* -timeout /nobreak /t 1 >nul -for /f "usebackq tokens=5" %%a in (`netstat -aon ^| find "LISTENING" ^| find ":8000"`) do ( - taskkill /f /pid %%a >nul - goto :eof -) \ No newline at end of file