From 4cbbb6d82cbb5a8bafb2d1b1474f179e12303bee Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Tue, 7 Oct 2025 09:50:11 +0200 Subject: [PATCH 1/2] fix: directly download linux archive from symfony-cli releases --- src/scripts/tools/symfony.sh | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/scripts/tools/symfony.sh b/src/scripts/tools/symfony.sh index 03d2de24..e252b9f5 100644 --- a/src/scripts/tools/symfony.sh +++ b/src/scripts/tools/symfony.sh @@ -3,26 +3,10 @@ add_symfony_with_brew() { brew install symfony-cli/tap/symfony-cli } -get_symfony_artifact_url() { - arch=$(dpkg --print-architecture) - url=$(get -s -n "" https://raw.githubusercontent.com/symfony-cli/homebrew-tap/main/Formula/symfony-cli.rb 2<&1 | grep -m 1 "url.*linux.*${arch}" | cut -d\" -f 2) - if [ -z "$url" ]; then - url=$(get -s -n "" https://api.github.com/repos/symfony-cli/symfony-cli/releases 2<&1 | grep -m 1 "url.*linux.*${arch}.*gz\"" | cut -d\" -f 4) - fi - echo "$url" -} - add_symfony_helper() { if [ "$(uname -s)" = "Linux" ]; then - url="$(get_symfony_artifact_url)" - if [ -z "$url" ]; then - . "${0%/*}"/tools/brew.sh - configure_brew - add_symfony_with_brew - else - get -s -n "" "$url" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null - sudo chmod a+x /usr/local/bin/symfony - fi + get -s -n "" "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_$(dpkg --print-architecture).tar.gz" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null + sudo chmod a+x /usr/local/bin/symfony elif [ "$(uname -s)" = "Darwin" ]; then add_symfony_with_brew fi From 79ab6fe2696fc1acc9497c16f6ac909cf2dd5b76 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Tue, 7 Oct 2025 11:02:25 +0200 Subject: [PATCH 2/2] ci: use direct link instead of api call --- src/scripts/tools/symfony.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/scripts/tools/symfony.sh b/src/scripts/tools/symfony.sh index e252b9f5..b3963ba4 100644 --- a/src/scripts/tools/symfony.sh +++ b/src/scripts/tools/symfony.sh @@ -3,10 +3,26 @@ add_symfony_with_brew() { brew install symfony-cli/tap/symfony-cli } +get_symfony_artifact_url() { + arch=$(dpkg --print-architecture) + url=$(get -s -n "" https://raw.githubusercontent.com/symfony-cli/homebrew-tap/main/Formula/symfony-cli.rb 2<&1 | grep -m 1 "url.*linux.*${arch}" | cut -d\" -f 2) + if [ -z "$url" ]; then + url="https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_${arch}.tar.gz" + fi + echo "$url" +} + add_symfony_helper() { if [ "$(uname -s)" = "Linux" ]; then - get -s -n "" "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_$(dpkg --print-architecture).tar.gz" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null - sudo chmod a+x /usr/local/bin/symfony + url="$(get_symfony_artifact_url)" + if [ -z "$url" ]; then + . "${0%/*}"/tools/brew.sh + configure_brew + add_symfony_with_brew + else + get -s -n "" "$url" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null + sudo chmod a+x /usr/local/bin/symfony + fi elif [ "$(uname -s)" = "Darwin" ]; then add_symfony_with_brew fi