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 44
55export version=" $1 "
66db=${2:- install}
7+ phpversion=" ${3} "
78
89MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:- root}
910
1011set -eux
1112
13+ if [ -z " $phpversion " ]; then
1214PHPVERSION=$( php -r ' echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION."\n";' )
13- export PHPVERSION
15+ fi
16+
17+ show_phpinfo " $PHPVERSION "
1418
1519section_start " Run composer"
1620export APP_ENV=" dev"
Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ mysql_user () {
3434 echo " $1 " | mysql -udomjudge -pdomjudge ${2:- } | tee -a " $ARTIFACTS " /mysql.txt
3535}
3636
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+
3746section_start () {
3847 if [ " $# " -ne 1 ]; then
3948 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