mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
Merge pull request #156596 from samford/update-github-latest-livecheck-blocks
Update GithubLatest livecheck blocks
This commit is contained in:
+8
-13
@@ -9,20 +9,15 @@ cask "86box" do
|
||||
homepage "https://86box.net/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/86Box/86Box/releases/latest"
|
||||
regex(%r{href=.*?/download/v?(\d+(?:\.\d+)*)/86Box[._-]macOS.*?[._-]b(\d+).zip}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/v?(\d+(?:\.\d+)*)/86Box[._-]macOS.*?[._-]b(\d+)\.zip$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -26,20 +26,15 @@ cask "cockatrice" do
|
||||
homepage "https://cockatrice.github.io/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/Cockatrice/Cockatrice/releases/latest/"
|
||||
regex(%r{href=".*?/(\d+(?:-\d+)+)-Release-(\d+(?:\.\d+)+)/Cockatrice-([^/]+)-\2-macOS-[.\w]*\.dmg"}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/(\d+(?:-\d+)+)-Release-(\d+(?:\.\d+)+)/Cockatrice-([^/]+)-\2-macOS-[.\w]*\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[1]},#{match[0]},#{match[2]}" }
|
||||
"#{match[2]},#{match[1]},#{match[3]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "codeedit" do
|
||||
homepage "https://www.codeedit.app/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/CodeEditApp/CodeEdit/releases/latest"
|
||||
regex(%r{href=.*?/download/\D*?([^/]+?)/CodeEdit[._-]([a-f0-9]+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/\D*?([^/]+?)/CodeEdit[._-]([a-f0-9]+)\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -8,20 +8,15 @@ cask "codeexpander" do
|
||||
homepage "https://github.com/oncework/codeexpander"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/oncework/codeexpander/releases/latest"
|
||||
regex(%r{href=.*?/CodeExpander-(\d+(?:\.\d+)+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^CodeExpander[._-]v?(\d+(?:\.\d+)+)\.dmg$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| match[0] }
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -8,20 +8,15 @@ cask "devcleaner" do
|
||||
homepage "https://github.com/vashpan/xcode-dev-cleaner"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/vashpan/xcode-dev-cleaner/releases/latest"
|
||||
regex(/DevCleaner[._-]v?(\d+(?:[.-]\d+)+)\.zip/i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^DevCleaner[._-]v?(\d+(?:[.-]\d+)+)\.zip$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| match[0] }
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -17,20 +17,15 @@ cask "dosbox-x" do
|
||||
homepage "https://dosbox-x.com/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/joncampbell123/dosbox-x/releases/latest"
|
||||
regex(%r{href=".*?/dosbox-x-v?(\d+(?:\.\d+)+)/dosbox-x-macosx-#{arch}-([^/]+)\.zip"}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/dosbox-x-v?(\d+(?:\.\d+)+)/dosbox-x-macosx-#{arch}-([^/]+)\.zip$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -12,20 +12,15 @@ cask "dynobase" do
|
||||
homepage "https://dynobase.dev/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/Dynobase/dynobase/releases/latest"
|
||||
regex(%r{(\d+(?:\.\d+)+)/Dynobase[._-](\d+(?:\.\d+)+)[._-]+Build[._-](\S+)[._-]#{arch}\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/v?(\d+(?:\.\d+)+)/Dynobase[._-](\d+(?:\.\d+)+)[._-]+Build[._-](\S+)[._-]#{arch}\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[1]},#{match[2]},#{match[0]}" }
|
||||
"#{match[2]},#{match[3]},#{match[1]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "fontforge" do
|
||||
homepage "https://fontforge.github.io/en-US/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/fontforge/fontforge/releases/latest"
|
||||
regex(%r{href=.*?/FontForge-(\d+(?:-\d+)*)-([0-9a-f]+)\.app\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^FontForge[._-]v?(\d+(?:-\d+)+)-([0-9a-f]+)\.app\.dmg/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "ganttproject" do
|
||||
homepage "https://www.ganttproject.biz/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/bardsoftware/ganttproject/releases/latest"
|
||||
regex(%r{href=.*ganttproject[._-]v?(\d+(?:\.\d+)+)/ganttproject[._-]v?(\d+(?:\.\d+)+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/ganttproject[._-]v?(\d+(?:\.\d+)+)/ganttproject[._-]v?(\d+(?:\.\d+)+)\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -8,20 +8,15 @@ cask "get-iplayer-automator" do
|
||||
homepage "https://github.com/Ascoware/get-iplayer-automator"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/Ascoware/get-iplayer-automator/releases/latest"
|
||||
regex(%r{href=.*?/Get\.?iPlayer\.?Automator\.?v?(\d+(?:.\d+)*).b(\d+)\.zip}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^Get\.?iPlayer\.?Automator\.?v?(\d+(?:.\d+)*)\.b(\d+)\.zip$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "ghidra" do
|
||||
homepage "https://www.ghidra-sre.org/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/NationalSecurityAgency/ghidra/releases/latest"
|
||||
regex(/href=.*?ghidra[._-]v?(\d+(?:\.\d+)+)[._-]PUBLIC[._-](\d+)\.zip/i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^ghidra[._-]v?(\d+(?:\.\d+)+)[._-]PUBLIC[._-](\d+)\.zip$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "gittyup" do
|
||||
homepage "https://murmele.github.io/Gittyup/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/Murmele/Gittyup/releases/latest"
|
||||
regex(%r{href=.*?/Gittyup-(\d+(?:\.\d+)+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^Gittyup[._-]v?(\d+(?:\.\d+)+)\.dmg$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| match[0] }
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "gnucash" do
|
||||
homepage "https://www.gnucash.org/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/Gnucash/gnucash/releases/latest"
|
||||
regex(%r{href=.*/Gnucash-Intel-v?(\d+\.\d+-\d+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^Gnucash-Intel[._-]v?(\d+(?:[.-]\d+)+)\.dmg$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| match[0] }
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -12,20 +12,15 @@ cask "gramps" do
|
||||
homepage "https://gramps-project.org/blog/"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/gramps-project/gramps/releases/latest"
|
||||
regex(/Gramps[._-]#{arch}[._-]v?(\d+(?:.\d+)+)[._-](\d+)\.dmg/i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^Gramps[._-]#{arch}[._-]v?(\d+(?:.\d+)+)[._-](\d+)\.dmg$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -8,20 +8,15 @@ cask "iconchanger" do
|
||||
homepage "https://github.com/underthestars-zhy/IconChanger"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/underthestars-zhy/IconChanger/releases/latest"
|
||||
regex(%r{href=.*?download/v?(\d+(?:\.\d+)*)/IconChanger[._-](\d+(?:-\d+)*)[._-](\d+(?:-\d+)*).zip}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/v?(\d+(?:\.\d+)+)/IconChanger[._-](\d+(?:-\d+)+)[._-](\d+(?:-\d+)+)\.zip$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]},#{match[2]}" }
|
||||
"#{match[1]},#{match[2]},#{match[3]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -9,20 +9,15 @@ cask "inform" do
|
||||
homepage "https://ganelson.github.io/inform-website"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/ganelson/inform/releases/latest"
|
||||
regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/.*?macOS[._-](\d+(?:_\d+)+)\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(%r{/v?(\d+(?:\.\d+)+)/.*?macOS[._-]v?(\d+(?:_\d+)+)\.dmg$}i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["browser_download_url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+6
-2
@@ -7,9 +7,13 @@ cask "jmc" do
|
||||
desc "Media organizer"
|
||||
homepage "https://github.com/jcm93/jmc"
|
||||
|
||||
# This regex should be removed or tightened (/^v?(\d+(?:\.\d+)+)$/i) when
|
||||
# upstream starts publishing stable versions. Until then, it has to be loose
|
||||
# enough to match unstable versions like `0.2-beta.6`, etc.).
|
||||
livecheck do
|
||||
url "https://github.com/jcm93/jmc/releases/latest"
|
||||
regex(%r{releases/tag/v?(\d+(?:\.\d+)*((?:-beta)?)*(\d+)?)}i)
|
||||
url :url
|
||||
regex(/^v?(\d+(?:\.\d+)+.+)$/i)
|
||||
strategy :github_latest
|
||||
end
|
||||
|
||||
app "jmc.app"
|
||||
|
||||
@@ -8,20 +8,15 @@ cask "kapitainsky-rclone-browser" do
|
||||
homepage "https://github.com/kapitainsky/RcloneBrowser"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/kapitainsky/RcloneBrowser/releases/latest"
|
||||
regex(%r{href=.*?/rclone-browser-(\d+(?:.\d+)*)-([0-9a-f]+)-macos\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^rclone-browser[._-]v?(\d+(?:\.\d+)+)-([0-9a-f]+)-macos\.dmg/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -8,20 +8,15 @@ cask "klogg" do
|
||||
homepage "https://github.com/variar/klogg"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/variar/klogg/releases/latest"
|
||||
regex(%r{href=.*?/klogg-(\d+(?:\.\d+)*)-OSX-Qt5\.dmg}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^klogg[._-]v?(\d+(?:\.\d+)+)-OSX-Qt5\.dmg$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| match[0] }
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+8
-13
@@ -8,20 +8,15 @@ cask "lyricsx" do
|
||||
homepage "https://github.com/ddddxxx/LyricsX"
|
||||
|
||||
livecheck do
|
||||
url "https://github.com/ddddxxx/LyricsX/releases/latest"
|
||||
regex(%r{href=.*?/LyricsX_(\d+(?:\.\d+)*)\+(\d+)\.zip}i)
|
||||
strategy :header_match do |headers, regex|
|
||||
next if headers["location"].blank?
|
||||
url :url
|
||||
regex(/^LyricsX[._-]v?(\d+(?:\.\d+)+)\+(\d+)\.zip$/i)
|
||||
strategy :github_latest do |json, regex|
|
||||
json["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
# Identify the latest tag from the response's `location` header
|
||||
latest_tag = File.basename(headers["location"])
|
||||
next if latest_tag.blank?
|
||||
|
||||
# Fetch the assets list HTML for the latest tag and match within it
|
||||
assets_page = Homebrew::Livecheck::Strategy.page_content(
|
||||
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
|
||||
)
|
||||
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
|
||||
"#{match[1]},#{match[2]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user