Rewrite script (#87)

This commit is contained in:
Dengke Tang
2023-02-27 15:33:00 -08:00
committed by GitHub
parent c0ab7116b0
commit ff20f95232
12 changed files with 289 additions and 261 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -ex
BASENAME=${0}
TOOLS_DIR=$(dirname ${BASENAME})
WORK_DIR="${TOOLS_DIR}/.."
cd "${WORK_DIR}"
launcher=
if command -v catchsegv; then
launcher=catchsegv
fi
if [ -z $PHP_BINARY ]; then
PHP_BINARY=$(which php)
fi
if [ ! -d vendor ]; then
COMPOSER_BINARY=$(which composer)
$PHP_BINARY -c php.ini $COMPOSER_BINARY update
fi
$launcher $PHP_BINARY -c php.ini vendor/bin/phpunit tests --debug