Merge pull request #13409 from samford/livecheck/gnome-update-default-regex-and-filtering
Gnome: Update default regex and version filtering
This commit is contained in:
commit
edea67f8bd
@ -66,7 +66,7 @@ module Homebrew
|
|||||||
# GNOME archive files seem to use a standard filename format, so we
|
# GNOME archive files seem to use a standard filename format, so we
|
||||||
# count on the delimiter between the package name and numeric
|
# count on the delimiter between the package name and numeric
|
||||||
# version being a hyphen and the file being a tarball.
|
# version being a hyphen and the file being a tarball.
|
||||||
values[:regex] = /#{regex_name}-(\d+(?:\.\d+)+)\.t/i
|
values[:regex] = /#{regex_name}-(\d+(?:\.\d+)*)\.t/i
|
||||||
|
|
||||||
values
|
values
|
||||||
end
|
end
|
||||||
@ -99,7 +99,11 @@ module Homebrew
|
|||||||
# Filter out unstable versions using the old version scheme where
|
# Filter out unstable versions using the old version scheme where
|
||||||
# the major version is below 40.
|
# the major version is below 40.
|
||||||
version_data[:matches].reject! do |_, version|
|
version_data[:matches].reject! do |_, version|
|
||||||
version.major < 40 && (version.minor >= 90 || version.minor.to_i.odd?)
|
next if version.major >= 40
|
||||||
|
next if version.minor.blank?
|
||||||
|
|
||||||
|
(version.minor.to_i.odd? || version.minor >= 90) ||
|
||||||
|
(version.patch.present? && version.patch >= 90)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ describe Homebrew::Livecheck::Strategy::Gnome do
|
|||||||
let(:generated) {
|
let(:generated) {
|
||||||
{
|
{
|
||||||
url: "https://download.gnome.org/sources/abc/cache.json",
|
url: "https://download.gnome.org/sources/abc/cache.json",
|
||||||
regex: /abc-(\d+(?:\.\d+)+)\.t/i,
|
regex: /abc-(\d+(?:\.\d+)*)\.t/i,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user