Git: Remove tags_only_debian logic

The `tags_only_debian` code in livecheck's `Git` strategy was
originally introduced in Homebrew/homebrew-livecheck#131 when
livecheck was in a less mature state and relied more on internal
special-casing like this (i.e., while we worked to add appropriate
`livecheck` blocks). This logic only has the potential to be
beneficial when a formula/cask doesn't contain a `livecheck` block
but I would argue that we shouldn't be making assumptions in the
strategy around whether tags with a `debian/` prefix should be
matched or omitted. The answer depends upon the context of a given
formula/cask and should be handled with a `livecheck` block, as we
do with other situations like this.
This commit is contained in:
Sam Ford 2022-06-02 22:16:03 -04:00
parent 022ecfe692
commit 64a7c1f821
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -101,13 +101,7 @@ module Homebrew
return Strategy.handle_block_return(block_return_value)
end
tags_only_debian = tags.all? { |tag| tag.start_with?("debian/") }
tags.map do |tag|
# Skip tag if it has a 'debian/' prefix and upstream does not do
# only 'debian/' prefixed tags
next if tag =~ %r{^debian/} && !tags_only_debian
if regex
# Use the first capture group (the version)
tag.scan(regex).first&.first