-
Notifications
You must be signed in to change notification settings - Fork 8
/
test
executable file
·28 lines (21 loc) · 907 Bytes
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
declare -a php_major_version=$(php -v | head -n 1 | cut -c 5)
declare -a laravel=("7.*" "8.*")
declare -a testbench=("5.*" "6.*")
if [ $php_major_version == "8" ]; then
declare -a laravel=("9.*")
declare -a testbench=("7.*")
fi
for i in "${!laravel[@]}"
do
echo "${laravel[i]}"
echo "${testbench[i]}"
composer remove --quiet illuminate/support orchestra/testbench
composer require --no-update --no-interaction --quiet "illuminate/support:${laravel[i]}" "orchestra/testbench:${testbench[i]}"
composer update --prefer-dist --no-interaction --quiet --prefer-lowest
./vendor/bin/phpunit
done
## composer remove --quiet illuminate/support orchestra/testbench \
## && composer require --no-update --no-interaction --quiet "illuminate/support:7" "orchestra/testbench:5" \
## && composer update --prefer-lowest --prefer-dist --no-interaction \
## && ./vendor/bin/phpunit