Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whatsapp: migrate casks #172433

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Casks/w/whatsapp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

auto_updates true
conflicts_with cask: [
"whatsapp-beta",
"whatsapp-legacy",
"whatsapp@beta",
"whatsapp@legacy",
]
depends_on macos: ">= :big_sur"

Expand Down
43 changes: 43 additions & 0 deletions Casks/w/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cask "whatsapp@beta" do
version "2.24.8.85"
sha256 "80f292adbf879ad2fb6f72ef42ff4d801289e2a43901dca817b1b599f194b429"

url "https://web.whatsapp.com/desktop/mac_native/release/?version=#{version}&extension=zip&configuration=Beta&branch=relbranch"
name "WhatsApp Beta"
desc "Native desktop client for WhatsApp"
homepage "https://www.whatsapp.com/"

livecheck do
url "https://web.whatsapp.com/desktop/mac_native/updates/?branch=relbranch&configuration=Beta"
regex(/version=v?(\d+(?:\.\d+)+)/i)
strategy :sparkle do |item, regex|
item.url.scan(regex).map(&:first)
end
end

auto_updates true
conflicts_with cask: [
"whatsapp",
"whatsapp@legacy",
]
depends_on macos: ">= :big_sur"

app "WhatsApp.app"

zap trash: [
"~/Library/Application Scripts/net.whatsapp.WhatsApp",
"~/Library/Application Scripts/net.whatsapp.WhatsApp.Intents",
"~/Library/Application Scripts/net.whatsapp.WhatsApp.IntentsUI",
"~/Library/Application Scripts/net.whatsapp.WhatsApp.ServiceExtension",
"~/Library/Caches/net.whatsapp.WhatsApp",
"~/Library/Containers/net.whatsapp.WhatsApp",
"~/Library/Containers/net.whatsapp.WhatsApp.Intents",
"~/Library/Containers/net.whatsapp.WhatsApp.ServiceExtension",
"~/Library/Group Containers/group.com.facebook.family",
"~/Library/Group Containers/group.net.whatsapp.family",
"~/Library/Group Containers/group.net.whatsapp.WhatsApp.private",
"~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared",
"~/Library/Group Containers/group.net.whatsapp.WhatsAppSMB.shared",
"~/Library/Saved Application State/net.whatsapp.WhatsApp.savedState",
]
end
35 changes: 35 additions & 0 deletions Casks/w/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cask "whatsapp@legacy" do
version "2.2416.2"
sha256 "4697863bd8c8a26d1a7a944e873af40d8b288a9780d04667d894391e27b6a4a4"

url "https://web.whatsapp.com/desktop/mac/files/release-#{version}.zip"
name "WhatsApp Legacy"
desc "Legacy desktop client for WhatsApp"
homepage "https://www.whatsapp.com/"

livecheck do
url "https://web.whatsapp.com/desktop/mac/releases"
strategy :json do |json|
json["name"]
end
end

auto_updates true
conflicts_with cask: [
"whatsapp",
"whatsapp@beta",
]

app "WhatsApp.app"

zap trash: [
"~/Library/Application Support/WhatsApp",
"~/Library/Application Support/WhatsApp.ShipIt",
"~/Library/Caches/WhatsApp",
"~/Library/Caches/WhatsApp.ShipIt",
"~/Library/Preferences/ByHost/WhatsApp.ShipIt.*.plist",
"~/Library/Preferences/WhatsApp-Helper.plist",
"~/Library/Preferences/WhatsApp.plist",
"~/Library/Saved Application State/WhatsApp.savedState",
]
end