Add back support for nightly builds on self-hosted

This commit is contained in:
Shivam Mathur 2023-11-27 14:52:14 +05:30
parent eeddcfe955
commit 124d256c78
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -99,11 +99,17 @@ add_devtools() {
add_log "${tick:?}" "$tool" "Added $tool $semver" add_log "${tick:?}" "$tool" "Added $tool $semver"
} }
# Function to setup the nightly build from shivammathur/php-builder
setup_nightly() {
run_script "php-builder" "${runner:?}" "$version" "${debug:?}" "${ts:?}"
}
# Function to setup PHP 5.3, PHP 5.4 and PHP 5.5. # Function to setup PHP 5.3, PHP 5.4 and PHP 5.5.
setup_old_versions() { setup_old_versions() {
run_script "php5-ubuntu" "$version" run_script "php5-ubuntu" "$version"
} }
# Function to setup PHP from the cached builds.
setup_cached_versions() { setup_cached_versions() {
run_script "php-ubuntu" "$version" "${debug:?}" "${ts:?}" run_script "php-ubuntu" "$version" "${debug:?}" "${ts:?}"
} }
@ -168,9 +174,13 @@ update_php() {
# Function to install PHP. # Function to install PHP.
add_php() { add_php() {
if [ "${runner:?}" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then if [ "${runner:?}" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then
if [[ "$version" =~ ${nightly_versions:?} ]]; then
setup_nightly
else
add_packaged_php add_packaged_php
switch_version >/dev/null 2>&1 switch_version >/dev/null 2>&1
add_pecl add_pecl
fi
elif [[ "$version" =~ ${old_versions:?} ]]; then elif [[ "$version" =~ ${old_versions:?} ]]; then
setup_old_versions setup_old_versions
else else