From 68cf12f584dab570ceb77e3556ddbeb0b64c9fcf Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 15 Aug 2025 12:12:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Use=20HOMEBREW=5FDOWNLOAD=5FCONC?= =?UTF-8?q?URRENCY=3Dauto=20(homebrew=206.4+)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should significantly speed up installs of PHP versions and also extensions. This will become the default at some point in Homebrew's future, but it is nice to benefit from this already. --- .../Commands/PHP Extensions/InstallPhpExtensionCommand.swift | 1 + .../Commands/PHP Extensions/RemovePhpExtensionCommand.swift | 1 + .../Commands/PHP Versions/ModifyPhpVersionCommand.swift | 2 ++ .../Commands/PHP Versions/RemovePhpVersionCommand.swift | 1 + 4 files changed, 5 insertions(+) diff --git a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/InstallPhpExtensionCommand.swift b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/InstallPhpExtensionCommand.swift index 09e965e0..5d8a41cc 100644 --- a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/InstallPhpExtensionCommand.swift +++ b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/InstallPhpExtensionCommand.swift @@ -51,6 +51,7 @@ class InstallPhpExtensionCommand: BrewCommand { let command = """ export HOMEBREW_NO_INSTALL_UPGRADE=true; \ export HOMEBREW_NO_INSTALL_CLEANUP=true; \ + export HOMEBREW_DOWNLOAD_CONCURRENCY=auto; \ \(Paths.brew) install \(self.installing.map { $0.formulaName }.joined(separator: " ")) --force """ diff --git a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/RemovePhpExtensionCommand.swift b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/RemovePhpExtensionCommand.swift index f81c88a1..60e6b5cc 100644 --- a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/RemovePhpExtensionCommand.swift +++ b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Extensions/RemovePhpExtensionCommand.swift @@ -36,6 +36,7 @@ class RemovePhpExtensionCommand: BrewCommand { let command = """ export HOMEBREW_NO_INSTALL_UPGRADE=true; \ export HOMEBREW_NO_INSTALL_CLEANUP=true; \ + export HOMEBREW_DOWNLOAD_CONCURRENCY=auto; \ \(Paths.brew) remove \(phpExtension.formulaName) --force --ignore-dependencies """ diff --git a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/ModifyPhpVersionCommand.swift b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/ModifyPhpVersionCommand.swift index 60e08d8d..144432bd 100644 --- a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/ModifyPhpVersionCommand.swift +++ b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/ModifyPhpVersionCommand.swift @@ -92,6 +92,7 @@ class ModifyPhpVersionCommand: BrewCommand { // Upgrade the main formula let command = """ + export HOMEBREW_DOWNLOAD_CONCURRENCY=auto; \ export HOMEBREW_NO_INSTALL_CLEANUP=true; \ \(Paths.brew) upgrade php; \(Paths.brew) install php@\(short); @@ -108,6 +109,7 @@ class ModifyPhpVersionCommand: BrewCommand { } let command = """ + export HOMEBREW_DOWNLOAD_CONCURRENCY=auto; \ export HOMEBREW_NO_INSTALL_UPGRADE=true; \ export HOMEBREW_NO_INSTALL_CLEANUP=true; \ \(Paths.brew) upgrade \(self.upgrading.map { $0.name }.joined(separator: " ")) diff --git a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/RemovePhpVersionCommand.swift b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/RemovePhpVersionCommand.swift index 50f4b462..2d8bf6ec 100644 --- a/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/RemovePhpVersionCommand.swift +++ b/phpmon/Domain/Integrations/Homebrew/Commands/PHP Versions/RemovePhpVersionCommand.swift @@ -33,6 +33,7 @@ class RemovePhpVersionCommand: BrewCommand { )) let command = """ + export HOMEBREW_DOWNLOAD_CONCURRENCY=auto; \ export HOMEBREW_NO_INSTALL_UPGRADE=true; \ export HOMEBREW_NO_INSTALL_CLEANUP=true; \ \(Paths.brew) remove \(formula) --force --ignore-dependencies