-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependency-matrix.sh
More file actions
executable file
·70 lines (61 loc) · 1.37 KB
/
dependency-matrix.sh
File metadata and controls
executable file
·70 lines (61 loc) · 1.37 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
set -e
getPhpVersion () {
php -r "echo PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;"
}
cleanup () {
rm composer.lock || true
rm -rf vendor || true
}
installLaravel () {
composer require laravel/framework:"$1" --dev --with-all-dependencies
composer update
}
PHP_74_LARAVEL=("^7.0" "^8.0")
PHP_80_LARAVEL=("^7.0" "^8.0" "^9.0")
PHP_81_LARAVEL=("^8.0" "^9.0" "^10.0")
PHP_82_LARAVEL=("^8.0" "^9.0" "^10.0")
if [ "$(getPhpVersion)" = "7.4" ]
then
echo "-------- PHP 7.4 --------"
for version in "${PHP_74_LARAVEL[@]}"
do
echo "### Test Laravel ${version} ###"
cleanup
installLaravel $version
composer run-script test
done
fi
if [ "$(getPhpVersion)" = "8.0" ]
then
echo "-------- PHP 8.0 --------"
for version in "${PHP_80_LARAVEL[@]}"
do
echo "### Test Laravel ${version} ###"
cleanup
installLaravel $version
composer run-script test
done
fi
if [ "$(getPhpVersion)" = "8.1" ]
then
echo "-------- PHP 8.1 --------"
for version in "${PHP_81_LARAVEL[@]}"
do
echo "### Test Laravel ${version} ###"
cleanup
installLaravel $version
composer run-script test
done
fi
if [ "$(getPhpVersion)" = "8.2" ]
then
echo "-------- PHP 8.2 --------"
for version in "${PHP_82_LARAVEL[@]}"
do
echo "### Test Laravel ${version} ###"
cleanup
installLaravel $version
composer run-script test
done
fi