cask "tableau" do arch arm: "-arm64" version "2025.2.0" sha256 arm: "d29a9589f64f36cf5ce2d0e7c5be497cf20d5796fb461d0cda3ee2033d37030f", intel: "ff437e63d63a19c6b12eb25ce10eca85d6253152965e455ef34a073688b6a028" url "https://downloads.tableau.com/esdalt/#{version}/TableauDesktop-#{version.dots_to_hyphens}#{arch}.dmg", user_agent: "curl/8.7.1" name "Tableau Desktop" desc "Data visualization software" homepage "https://www.tableau.com/products/desktop" # This checks the upstream Releases page because the XML file we were checking # (https://downloads.tableau.com/TableauAutoUpdate.xml) was missing the newest # versions. This check works locally but fails in our CI environment, so we # should return to checking the XML file if/when it starts being reliably # updated to include the newest releases again. livecheck do 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 depends_on macos: ">= :mojave" pkg "Tableau Desktop.pkg" uninstall pkgutil: [ "com.amazon.redshiftodbc", "com.simba.sparkodbc", "com.simba.sqlserverodbc", "com.tableausoftware.Desktop.app", "com.tableausoftware.DesktopShortcut", "com.tableausoftware.extensions", "com.tableausoftware.FLEXNet.*", "com.tableausoftware.mysql", "com.tableausoftware.networkExtensions", "com.tableausoftware.oracle", "com.tableausoftware.postgresql", "com.tableausoftware.telemetry", "simba.sparkodbc", ] zap delete: "/Library/Preferences/com.tableau.Tableau-#{version.major_minor}.plist", trash: [ "/Library/Preferences/com.tableau.Tableau-#{version.major_minor}.plist", "~/Documents/My Tableau Repository", "~/Library/Caches/com.tableau.caching", "~/Library/Caches/com.tableausoftware.MapTiles", "~/Library/Preferences/com.tableau.Registration.plist", "~/Library/Preferences/com.tableau.Tableau-#{version.major_minor}.plist", "~/Library/Saved Application State/com.tableausoftware.tableaudesktop.savedState", "~/Library/Tableau", ] end