Livecheck: Skip URL processing for GithubLatest

This commit is contained in:
Sam Ford 2020-12-05 11:44:28 -05:00
parent e37da96341
commit 7ef88f1966
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -25,6 +25,11 @@ module Homebrew
lolg.it
].freeze
STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL = [
:github_latest,
:page_match,
].freeze
UNSTABLE_VERSION_KEYWORDS = %w[
alpha
beta
@ -381,8 +386,8 @@ module Homebrew
next
end
# Do not preprocess the URL when livecheck.strategy is set to :page_match
url = if livecheck_strategy == :page_match
# Only preprocess the URL when it's appropriate
url = if STRATEGY_SYMBOLS_TO_SKIP_PREPROCESS_URL.include?(livecheck_strategy)
original_url
else
preprocess_url(original_url)