diff --git a/Casks/b/bitcoin-core.rb b/Casks/b/bitcoin-core.rb index c464e7f2a0..bba377b319 100644 --- a/Casks/b/bitcoin-core.rb +++ b/Casks/b/bitcoin-core.rb @@ -11,8 +11,8 @@ cask "bitcoin-core" do homepage "https://bitcoincore.org/" livecheck do - url "https://github.com/bitcoin/bitcoin" - strategy :github_latest + url "https://bitcoincore.org/en/download/" + regex(/href=.*?bitcoin[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}[^"' >]*?\.dmg/i) end depends_on macos: ">= :catalina" diff --git a/Casks/c/calibre.rb b/Casks/c/calibre.rb index 52d70de9d1..023fa05c46 100644 --- a/Casks/c/calibre.rb +++ b/Casks/c/calibre.rb @@ -44,8 +44,8 @@ cask "calibre" do sha256 "884061bce0df80085b4a9ce60da1f63530040f615804eb8cf499718a2e314a8e" livecheck do - url "https://github.com/kovidgoyal/calibre" - strategy :github_latest + url "https://calibre-ebook.com/dist/osx" + strategy :header_match end end diff --git a/Casks/l/litecoin.rb b/Casks/l/litecoin.rb index f48d3e0176..50c9d20f6e 100644 --- a/Casks/l/litecoin.rb +++ b/Casks/l/litecoin.rb @@ -8,8 +8,8 @@ cask "litecoin" do homepage "https://litecoin.org/" livecheck do - url "https://github.com/litecoin-project/litecoin" - strategy :github_latest + url :homepage + regex(/href=.*?litecoin[._-]v?(\d+(?:\.\d+)+)[^"' >]*?\.dmg/i) end app "Litecoin-Qt.app" diff --git a/Casks/m/mudlet.rb b/Casks/m/mudlet.rb index a85010a793..deb6e2b531 100644 --- a/Casks/m/mudlet.rb +++ b/Casks/m/mudlet.rb @@ -8,7 +8,8 @@ cask "mudlet" do homepage "https://www.mudlet.org/" livecheck do - url "https://github.com/Mudlet/Mudlet" + url "https://www.mudlet.org/download/" + regex(/href=.*?Mudlet[._-]v?(\d+(?:\.\d+)+)\.dmg/i) end depends_on macos: ">= :high_sierra" diff --git a/Casks/n/nwjs.rb b/Casks/n/nwjs.rb index 3c1076cf38..8eda34224d 100644 --- a/Casks/n/nwjs.rb +++ b/Casks/n/nwjs.rb @@ -10,9 +10,17 @@ cask "nwjs" do desc "Call all Node.js modules directly from the DOM and Web Workers" homepage "https://nwjs.io/" + # The upstream download page appends a UNIX epoch timestamp (in milliseconds) + # to the JSON URL, so we do the same (in case it affects the returned data). livecheck do - url "https://github.com/nwjs/nw.js" - regex(/^nw[._-]v?(\d+(?:\.\d+)+)$/i) + url "https://nwjs.io/versions.json?#{DateTime.now.strftime("%Q")}" + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :json do |json, regex| + match = json["stable"]&.match(regex) + next if match.blank? + + match[1] + end end app "nwjs-sdk-v#{version}-osx-#{arch}/nwjs.app" diff --git a/Casks/q/qlc-plus.rb b/Casks/q/qlc-plus.rb index b4e4d92c2c..96c6417fae 100644 --- a/Casks/q/qlc-plus.rb +++ b/Casks/q/qlc-plus.rb @@ -8,8 +8,8 @@ cask "qlc-plus" do homepage "https://qlcplus.org/" livecheck do - url "https://github.com/mcallegari/qlcplus" - regex(/^QLC\+[._-]v?(\d+(?:\.\d+)+)$/i) + url "https://qlcplus.org/download" + regex(/href=.*?QLC\+[._-]v?(\d+(?:\.\d+)+)\.dmg/i) end app "QLC+.app" diff --git a/Casks/t/tigervnc-viewer.rb b/Casks/t/tigervnc-viewer.rb index 347a645983..bf67e2dfaf 100644 --- a/Casks/t/tigervnc-viewer.rb +++ b/Casks/t/tigervnc-viewer.rb @@ -9,8 +9,8 @@ cask "tigervnc-viewer" do homepage "https://tigervnc.org/" livecheck do - url "https://github.com/TigerVNC/tigervnc" - strategy :github_latest + url "https://sourceforge.net/projects/tigervnc/rss?path=/stable" + regex(%r{url=.*?/TigerVNC[._-]v?(\d+(?:\.\d+)+)\.dmg}i) end app "TigerVNC Viewer #{version}.app" diff --git a/Casks/t/todour.rb b/Casks/t/todour.rb index 90f24cf7cb..bbaf59b53a 100644 --- a/Casks/t/todour.rb +++ b/Casks/t/todour.rb @@ -8,8 +8,8 @@ cask "todour" do homepage "https://nerdur.com/todour-pl/" livecheck do - url "https://github.com/SverrirValgeirsson/Todour" - strategy :github_latest + url :homepage + regex(/href=.*?Todour[._-]v?(\d+(?:\.\d+)+)\.dmg/i) end app "Todour.app" diff --git a/Casks/v/vagrant.rb b/Casks/v/vagrant.rb index 8534bcce67..b03c0a49aa 100644 --- a/Casks/v/vagrant.rb +++ b/Casks/v/vagrant.rb @@ -12,8 +12,8 @@ cask "vagrant" do homepage "https://www.vagrantup.com/" livecheck do - url "https://github.com/hashicorp/vagrant" - strategy :github_latest + url "https://developer.hashicorp.com/vagrant/install" + regex(/href=[^ >]*?vagrant[._-]v?(\d+(?:\.\d+)+)(?:[._-]darwin)?(?:[._-]#{arch})?\.dmg/i) end pkg "vagrant.pkg" diff --git a/Casks/z/zerotier-one.rb b/Casks/z/zerotier-one.rb index 9c27b308e7..9aa4de285f 100644 --- a/Casks/z/zerotier-one.rb +++ b/Casks/z/zerotier-one.rb @@ -5,11 +5,11 @@ cask "zerotier-one" do url "https://download.zerotier.com/RELEASES/#{version}/dist/ZeroTier%20One.pkg" name "ZeroTier One" desc "Mesh VPN client" - homepage "https://www.zerotier.com/download.shtml" + homepage "https://www.zerotier.com/" livecheck do - url "https://github.com/zerotier/ZeroTierOne" - strategy :github_latest + url "https://www.zerotier.com/download/" + regex(/Latest\s+Version[\s:|]+?v?(\d+(?:\.\d+)+)/i) end depends_on macos: ">= :high_sierra"