mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-09-26 03:24:34 +07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94719cf4ae | |||
| d211942997 |
@@ -184,7 +184,7 @@ get_brewed_php() {
|
|||||||
# Function to setup PHP from the cached builds.
|
# Function to setup PHP from the cached builds.
|
||||||
setup_cached_versions() {
|
setup_cached_versions() {
|
||||||
latest="releases/download/php-$version" run_script \
|
latest="releases/download/php-$version" run_script \
|
||||||
"php-darwin" "$version" "${debug:?}" "${ts:?}" >/dev/null 2>&1
|
"php-darwin" "$version" "${debug:?}" "${ts:?}" "" "${INPUT_EXTENSIONS:-}" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to setup PHP 5.6 and newer using Homebrew.
|
# Function to setup PHP 5.6 and newer using Homebrew.
|
||||||
@@ -196,7 +196,7 @@ add_php() {
|
|||||||
php_keg="php@$version$suffix"
|
php_keg="php@$version$suffix"
|
||||||
php_formula="shivammathur/php/$php_keg"
|
php_formula="shivammathur/php/$php_keg"
|
||||||
if [[ "$existing_version" = "false" || -n "$suffix" || "$action" = "upgrade" ]]; then
|
if [[ "$existing_version" = "false" || -n "$suffix" || "$action" = "upgrade" ]]; then
|
||||||
if [ "${runner:?}" != "self-hosted" ] && [ "${use_package_cache:-true}" != "false" ]; then
|
if [ "$(uname -m)" = "x86_64" ] || { [ "${runner:?}" != "self-hosted" ] && [ "${use_package_cache:-true}" != "false" ]; }; then
|
||||||
setup_cached_versions && return 0
|
setup_cached_versions && return 0
|
||||||
[ "$(uname -m)" != "x86_64" ] || return 1
|
[ "$(uname -m)" != "x86_64" ] || return 1
|
||||||
fi
|
fi
|
||||||
@@ -270,7 +270,7 @@ setup_php() {
|
|||||||
php_config="$(command -v php-config 2>/dev/null)"
|
php_config="$(command -v php-config 2>/dev/null)"
|
||||||
update=true
|
update=true
|
||||||
check_pre_installed
|
check_pre_installed
|
||||||
existing_version=$(get_brewed_php)
|
existing_version=$([ "$(uname -m)" != "x86_64" ] && get_brewed_php || echo false)
|
||||||
status="Found"
|
status="Found"
|
||||||
if [[ "$version" =~ ${old_versions:?} ]]; then
|
if [[ "$version" =~ ${old_versions:?} ]]; then
|
||||||
run_script "php5-darwin" "${version/./}" >/dev/null 2>&1
|
run_script "php5-darwin" "${version/./}" >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user