From 81b33da6abda8980e689f3be656a801d73b647bc Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Wed, 8 Jul 2026 11:01:55 +0100 Subject: [PATCH] Switch back to using the stable version of SwiftFormat. (#5850) --- Tools/Sources/Commands/SetupProject.swift | 7 +++---- ci_scripts/ci_common.sh | 10 +--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Tools/Sources/Commands/SetupProject.swift b/Tools/Sources/Commands/SetupProject.swift index 2ef37e6b6..3c388ee5a 100644 --- a/Tools/Sources/Commands/SetupProject.swift +++ b/Tools/Sources/Commands/SetupProject.swift @@ -17,10 +17,9 @@ struct SetupProject: ParsableCommand { } func brewInstall() throws { - try Zsh.run(command: "brew install xcodegen swiftgen git-lfs sourcery mint pkl kiliankoe/formulae/swift-outdated localazy/tools/localazy peripheryapp/periphery/periphery") - - // Install swiftformat from develop (for now), making sure to avoid conflicts with an existing versioned installation. - try Zsh.run(command: "source ci_scripts/ci_common.sh && install_swiftformat_head") + // Uninstall SwiftFormat from HEAD first if it is installed. + try Zsh.run(command: "if brew list --versions swiftformat | grep -q HEAD; then brew uninstall swiftformat; fi") + try Zsh.run(command: "brew install xcodegen swiftgen swiftformat git-lfs sourcery mint pkl kiliankoe/formulae/swift-outdated localazy/tools/localazy peripheryapp/periphery/periphery") } func mintPackagesInstall() throws { diff --git a/ci_scripts/ci_common.sh b/ci_scripts/ci_common.sh index 5beef9017..da43fdf4e 100755 --- a/ci_scripts/ci_common.sh +++ b/ci_scripts/ci_common.sh @@ -15,15 +15,7 @@ setup_github_actions_environment() { unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 - brew update && brew install xcodegen swiftlint git-lfs pkl a7ex/homebrew-formulae/xcresultparser - install_swiftformat_head -} - -install_swiftformat_head() { - if brew list --versions swiftformat &>/dev/null && ! brew list --versions swiftformat | grep -q HEAD; then - brew uninstall swiftformat - fi - brew install swiftformat --HEAD + brew update && brew install xcodegen swiftlint swiftformat git-lfs pkl a7ex/homebrew-formulae/xcresultparser } setup_github_actions_translations_environment() {