Skip to content

Commit

Permalink
tableau: update livecheck
Browse files Browse the repository at this point in the history
The previous `livecheck` block for `tableau` checked an XML file that
contained version information for Tableau Desktop but it hasn't been
updated for 2024.3.x releases. This updates the `livecheck` block to
check the upstream Releases page for now, as it contains version
information for the newest versions (e.g., 2024.3.0, 2024.3.1).
  • Loading branch information
samford committed Dec 2, 2024
1 parent 251bb0c commit 2bc1bf1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Casks/t/tableau.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
homepage "https://www.tableau.com/products/desktop"

livecheck do
url "https://www.tableau.com/app/discover/desktop"
strategy :page_match do |page|
match = page.match(/<section[^>]+data-version-before=["'](\d+\.\d+\.\d+)["']/i)
match[1] if match
url "https://www.tableau.com/support/releases"
regex(%r{href=.*?desktop/v?(\d+(?:\.\d+)+)[^"' >]*["' >]}i)
strategy :page_match do |page, regex|
page.scan(regex).map do |match|
if (version = match[0]).count(".") >= 2
version
else
"#{version}.0"
end
end
end
end

Expand Down

0 comments on commit 2bc1bf1

Please sign in to comment.