Sync brew params from v2

Add check for image constants
This commit is contained in:
Shivam Mathur 2021-02-22 10:58:46 +05:30
parent fdaf1f0003
commit 827b051fea
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -224,7 +224,7 @@ add_pecl() {
# Function to update dependencies
update_dependencies() {
if [ "$version" = '8.0' ]; then
if [ "$version" = '8.0' ] && [ "${ImageOS:-}" != "" ] && [ "${ImageVersion:-}" != "" ]; 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+=( $! )
@ -263,6 +263,9 @@ brew_prefix="$(brew --prefix)"
brew_repo="$(brew --repository)"
tap_dir="$brew_repo"/Library/Taps
existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
export HOMEBREW_CHANGE_ARCH_TO_ARM=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_AUTO_UPDATE=1
# Setup PHP
step_log "Setup PHP"