@@ -9,10 +9,11 @@ add_license_log() {
9
9
10
10
# Function to get the tag for a php version.
11
11
get_tag () {
12
- master_version=' 8.0'
13
12
tag=' master'
14
- if [ ! " ${version:? } " = " $master_version " ]; then
13
+ if ! [[ ${version:? } =~ $nightly_versions ] ]; then
15
14
tag=" php-$( php -v | head -n 1 | cut -f 2 -d ' ' | cut -f 1 -d ' -' ) "
15
+ elif [ " ${version:? } " = ' 8.0' ]; then
16
+ tag=" PHP-8.0"
16
17
fi
17
18
echo " $tag "
18
19
}
@@ -72,18 +73,23 @@ restore_phpize() {
72
73
73
74
# Function to patch pdo_oci.
74
75
patch_pdo_oci_config () {
75
- curl -O " ${curl_opts[@]} " https://raw.githubusercontent.com/php/php-src/master/ext/pdo_oci/config.m4
76
- sudo sed -i ' ' " /PHP_CHECK_PDO_INCLUDES/d" config.m4 || sudo sed -i " /PHP_CHECK_PDO_INCLUDES/d" config.m4
76
+ curl -O " ${curl_opts[@]} " https://raw.githubusercontent.com/php/php-src/PHP-8.0/ext/pdo_oci/config.m4
77
+ if [[ ${version:? } =~ 5.[3-6] ]]; then
78
+ sudo sed -i ' ' " /PHP_CHECK_PDO_INCLUDES/d" config.m4 2> /dev/null || sudo sed -i " /PHP_CHECK_PDO_INCLUDES/d" config.m4
79
+ fi
77
80
}
78
81
79
82
# Function to install the dependencies.
80
83
add_dependencies () {
81
84
if [ " $os " = ' Linux' ]; then
82
85
if [ " ${runner:? } " = " self-hosted" ]; then
83
- ${apt_install:? } autoconf automake libaio-dev gcc g++ php" $version " -dev
86
+ if ! [[ ${version:? } =~ $nightly_versions ]]; then
87
+ ${apt_install:? } --no-upgrade --no-install-recommends autoconf automake libaio-dev gcc g++ php" $version " -dev
88
+ else
89
+ ${apt_install:? } --no-upgrade --no-install-recommends autoconf automake libaio-dev gcc g++
90
+ fi
84
91
else
85
- update_lists
86
- ${apt_install:? } php" $version " -dev
92
+ ! [[ ${version:? } =~ $nightly_versions ]] && update_lists && ${apt_install:? } --no-upgrade --no-install-recommends php" $version " -dev
87
93
fi
88
94
sudo update-alternatives --set php-config /usr/bin/php-config" $version "
89
95
sudo update-alternatives --set phpize /usr/bin/phpize" $version "
@@ -117,6 +123,7 @@ add_oci() {
117
123
oracle_home=' /opt/oracle'
118
124
oracle_client=$oracle_home /instantclient
119
125
os=$( uname -s)
126
+ nightly_versions=' 8.[0-1]'
120
127
add_client > /dev/null 2>&1
121
128
add_dependencies > /dev/null 2>&1
122
129
add_oci_helper > /dev/null 2>&1
0 commit comments