Skip to content

Commit

Permalink
Update dependencies as per runner on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Oct 23, 2020
1 parent 4adaa73 commit 04a9e3b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/scripts/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,23 @@ add_pecl() {
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.
setup_php() {
action=$1
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew tap --shallow shivammathur/homebrew-php
update_dependencies
if brew list php@"$version" 2>/dev/null | grep -q "Error" && [ "$action" != "upgrade" ]; then
brew unlink php@"$version"
else
Expand All @@ -271,6 +283,7 @@ version=$1
dist=$2
fail_fast=$3
nodot_version=${1/./}
nightly_versions="8.[0-1]"
old_versions="5.[3-5]"
tool_path_dir="/usr/local/bin"
curl_opts=(-sL)
Expand Down

0 comments on commit 04a9e3b

Please sign in to comment.