Merge pull request #11746 from samford/livecheck/sourceforge-do-not-modify-rss-urls

Sourceforge: Do not modify RSS URLs
This commit is contained in:
Sam Ford 2021-07-20 18:17:39 -04:00 committed by GitHub
commit e125e2b3ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,11 @@ module Homebrew
def self.find_versions(url, regex, cask: nil, &block)
match = url.match(URL_MATCH_REGEX)
page_url = "https://sourceforge.net/projects/#{match[:project_name]}/rss"
page_url = if url.match?(%r{/rss(?:/?$|\?)})
url
else
"https://sourceforge.net/projects/#{match[:project_name]}/rss"
end
# It may be possible to improve the default regex but there's quite a
# bit of variation between projects and it can be challenging to