Merge pull request #20462 from Homebrew/gnu-livecheck

livecheck/strategy/gnu: use `ftpmirror.gnu.org` too
This commit is contained in:
Carlo Cabrera 2025-08-14 15:22:55 +00:00 committed by GitHub
commit 5e17e569b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ module Homebrew
return values if match.blank? return values if match.blank?
# The directory listing page for the project's files # The directory listing page for the project's files
values[:url] = "https://ftp.gnu.org/gnu/#{match[:project_name]}/" values[:url] = "https://ftpmirror.gnu.org/gnu/#{match[:project_name]}/"
regex_name = Regexp.escape(T.must(match[:project_name])).gsub("\\-", "-") regex_name = Regexp.escape(T.must(match[:project_name])).gsub("\\-", "-")

View File

@ -7,7 +7,7 @@ RSpec.describe Homebrew::Livecheck::Strategy::Gnu do
let(:gnu_urls) do let(:gnu_urls) do
{ {
no_version_dir: "https://ftp.gnu.org/gnu/abc/abc-1.2.3.tar.gz", no_version_dir: "https://ftpmirror.gnu.org/gnu/abc/abc-1.2.3.tar.gz",
software_page: "https://www.gnu.org/software/abc/", software_page: "https://www.gnu.org/software/abc/",
subdomain: "https://abc.gnu.org", subdomain: "https://abc.gnu.org",
savannah: "https://download.savannah.gnu.org/releases/abc/abc-1.2.3.tar.gz", savannah: "https://download.savannah.gnu.org/releases/abc/abc-1.2.3.tar.gz",
@ -18,15 +18,15 @@ RSpec.describe Homebrew::Livecheck::Strategy::Gnu do
let(:generated) do let(:generated) do
{ {
no_version_dir: { no_version_dir: {
url: "https://ftp.gnu.org/gnu/abc/", url: "https://ftpmirror.gnu.org/gnu/abc/",
regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i,
}, },
software_page: { software_page: {
url: "https://ftp.gnu.org/gnu/abc/", url: "https://ftpmirror.gnu.org/gnu/abc/",
regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i,
}, },
subdomain: { subdomain: {
url: "https://ftp.gnu.org/gnu/abc/", url: "https://ftpmirror.gnu.org/gnu/abc/",
regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i,
}, },
savannah: {}, savannah: {},