From b7f2ad98a19314dee1711b7e05c89d43274e030f Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Sat, 24 Sep 2022 15:28:16 -0400 Subject: [PATCH] gauche: update livecheck Closes #111608. Signed-off-by: Rui Chen Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/gauche.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/gauche.rb b/Formula/gauche.rb index 9624a3a62ab..a3d8209f617 100644 --- a/Formula/gauche.rb +++ b/Formula/gauche.rb @@ -8,8 +8,10 @@ class Gauche < Formula livecheck do url :stable - strategy :github_latest - regex(/href=.*?Gauche[._-]v?(\d+(?:\.\d+)+(?:[._-]p\d+)?)\.t/i) + regex(%r{href=["']?[^"' >]*?/tag/\D*?(\d+(?:[._]\d+)+(?:[._-]?p\d+)?)["' >]}i) + strategy :github_latest do |page, regex| + page.scan(regex).map { |match| match[0].tr("_", ".") } + end end bottle do