File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
export version=" $1 "
6
6
db=${2:- install}
7
+ phpversion=" ${3} "
7
8
8
9
MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:- root}
9
10
10
11
set -eux
11
12
13
+ if [ -z " $phpversion " ]; then
12
14
PHPVERSION=$( php -r ' echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION."\n";' )
13
- export PHPVERSION
15
+ fi
16
+
17
+ show_phpinfo " $PHPVERSION "
14
18
15
19
section_start " Run composer"
16
20
export APP_ENV=" dev"
Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ mysql_user () {
34
34
echo " $1 " | mysql -udomjudge -pdomjudge ${2:- } | tee -a " $ARTIFACTS " /mysql.txt
35
35
}
36
36
37
+ show_phpinfo () {
38
+ phpversion=$1
39
+ section_start " Show the new PHP info"
40
+ update-alternatives --set php /usr/bin/php" ${phpversion} "
41
+ php -v
42
+ php -m
43
+ section_end
44
+ }
45
+
37
46
section_start () {
38
47
if [ " $# " -ne 1 ]; then
39
48
echo " Only 1 argument is needed for GHA, 2 was needed for GitLab."
You can’t perform that action at this time.
0 commit comments