mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Update dependencies as per runner on macOS
This commit is contained in:
parent
4adaa73d25
commit
04a9e3b562
@ -251,11 +251,23 @@ add_pecl() {
|
|||||||
add_log "$tick" "PECL" "Found PECL $pecl_version"
|
add_log "$tick" "PECL" "Found PECL $pecl_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to update dependencies.
|
||||||
|
update_dependencies() {
|
||||||
|
if [[ "$version" =~ $nightly_versions ]] && [ "$runner" != "self-hosted" ]; then
|
||||||
|
while read -r formula; do
|
||||||
|
curl -o "$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/$formula.rb" "${curl_opts[@]}" "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/$formula.rb" &
|
||||||
|
to_wait+=( $! )
|
||||||
|
done < "$(brew --prefix)/Homebrew/Library/Taps/shivammathur/homebrew-php/.github/deps/${ImageOS:?}_${ImageVersion:?}"
|
||||||
|
wait "${to_wait[@]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Function to setup PHP 5.6 and newer.
|
# Function to setup PHP 5.6 and newer.
|
||||||
setup_php() {
|
setup_php() {
|
||||||
action=$1
|
action=$1
|
||||||
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
|
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
|
||||||
brew tap --shallow shivammathur/homebrew-php
|
brew tap --shallow shivammathur/homebrew-php
|
||||||
|
update_dependencies
|
||||||
if brew list php@"$version" 2>/dev/null | grep -q "Error" && [ "$action" != "upgrade" ]; then
|
if brew list php@"$version" 2>/dev/null | grep -q "Error" && [ "$action" != "upgrade" ]; then
|
||||||
brew unlink php@"$version"
|
brew unlink php@"$version"
|
||||||
else
|
else
|
||||||
@ -271,6 +283,7 @@ version=$1
|
|||||||
dist=$2
|
dist=$2
|
||||||
fail_fast=$3
|
fail_fast=$3
|
||||||
nodot_version=${1/./}
|
nodot_version=${1/./}
|
||||||
|
nightly_versions="8.[0-1]"
|
||||||
old_versions="5.[3-5]"
|
old_versions="5.[3-5]"
|
||||||
tool_path_dir="/usr/local/bin"
|
tool_path_dir="/usr/local/bin"
|
||||||
curl_opts=(-sL)
|
curl_opts=(-sL)
|
||||||
|
Loading…
Reference in New Issue
Block a user