Skip to content

Commit f26eca7

Browse files
authored
Merge pull request #228154 from Homebrew/ghc-livecheck
ghc: add livecheck
2 parents a836456 + 3643ba3 commit f26eca7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Formula/g/ghc.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ class Ghc < Formula
77
head "https://gitlab.haskell.org/ghc/ghc.git", branch: "master"
88

99
livecheck do
10-
url "https://www.haskell.org/ghc/download.html"
11-
regex(/href=.*?download[._-]ghc[._-][^"' >]+?\.html[^>]*?>\s*?v?(\d+(?:\.\d+)+)\s*?</i)
10+
url "https://www.haskell.org/ghc/"
11+
regex(/href=.*?download[_-]ghc[_-]v?(\d+(?:[._]\d+)+)\.html/i)
12+
strategy :page_match do |page, regex|
13+
page.scan(regex).map { |match| match[0].tr("_", ".") }
14+
end
1215
end
1316

14-
no_autobump! because: :requires_manual_review
15-
1617
bottle do
1718
rebuild 1
1819
sha256 cellar: :any, arm64_sequoia: "91d82d69656f28ec22846128f6d28205b8f99f8a7abcce0406c309c394cef384"

0 commit comments

Comments
 (0)