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

various casks (g-i): migrate #172476

Merged
merged 12 commits into from
Apr 29, 2024
33 changes: 33 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cask "gimp@dev" do
arch arm: "arm64", intel: "x86_64"

version "2.99.18"
sha256 arm: "bb042d5647413ea5d374ac82092e3b6aa1602d72d7c8822d31c25c0a4b6bdf15",
intel: "196582ee69a8b3fdc075ff4aaf01bc1bc6975adac89650da12f80087b642e9ee"

url "https://download.gimp.org/pub/gimp/v#{version.major_minor}/osx/gimp-#{version}-#{arch}.dmg"
name "GIMP development version"
desc "Free and open-source image editor"
homepage "https://www.gimp.org/"

livecheck do
url "https://www.gimp.org/downloads/devel/"
regex(%r{href=.*?/gimp[._-]v?(\d+(?:[.-]\d+)+)[._-]#{arch}\.dmg}i)
end

conflicts_with cask: "gimp"
depends_on macos: ">= :high_sierra"

app "GIMP.app"
binary "#{appdir}/GIMP.app/Contents/MacOS/gimp"

postflight do
set_permissions "#{appdir}/GIMP.app/Contents/MacOS/gimp", "a+rx"
end

zap trash: [
"~/Library/Application Support/Gimp",
"~/Library/Preferences/org.gimp.gimp-#{version.major_minor}:.plist",
"~/Library/Saved Application State/org.gimp.gimp-#{version.major_minor}:.savedState",
]
end
43 changes: 43 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cask "github@beta" do
arch arm: "arm64", intel: "x64"
platform = on_arch_conditional arm: "darwin-arm64", intel: "darwin"

version "3.3.15-beta1-6f966315"
sha256 arm: "9c57b9e48ce983470ca6e72b07482870887abd02b3b8ae42659932cdd33789f4",
intel: "8e785a409c671aa6fcee335656af1eee0d36cd3c8039518a6a1136d506702d3c"

url "https://desktop.githubusercontent.com/github-desktop/releases/#{version}/GitHubDesktop-#{arch}.zip",
verified: "desktop.githubusercontent.com/github-desktop/releases/"
name "GitHub Desktop"
desc "Desktop client for GitHub repositories"
homepage "https://desktop.github.com/"

livecheck do
url "https://central.github.com/deployments/desktop/desktop/latest/#{platform}?env=beta"
regex(%r{(\d+(?:\.\d+)[^/]*)/GitHubDesktop[._-]#{arch}\.zip}i)
strategy :header_match
end

auto_updates true
conflicts_with cask: "github"
depends_on macos: ">= :catalina"

app "GitHub Desktop.app"
binary "#{appdir}/GitHub Desktop.app/Contents/Resources/app/static/github.sh", target: "github"

zap trash: [
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.github.GitHubClient.sfl*",
"~/Library/Application Support/com.github.GitHubClient",
"~/Library/Application Support/com.github.GitHubClient.ShipIt",
"~/Library/Application Support/GitHub Desktop",
"~/Library/Application Support/ShipIt_stderr.log",
"~/Library/Application Support/ShipIt_stdout.log",
"~/Library/Caches/com.github.GitHubClient",
"~/Library/Caches/com.github.GitHubClient.ShipIt",
"~/Library/Logs/GitHub Desktop",
"~/Library/Preferences/ByHost/com.github.GitHubClient.ShipIt.*.plist",
"~/Library/Preferences/com.github.GitHubClient.helper.plist",
"~/Library/Preferences/com.github.GitHubClient.plist",
],
rmdir: "~/.config/git"
end
29 changes: 29 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cask "godot@3" do
version "3.5.3"
sha256 "d448bf70a438edfd506c6878963327d7814d83fd636d132294fb7abb1f971246"

url "https://downloads.tuxfamily.org/godotengine/#{version}/Godot_v#{version}-stable_osx.universal.zip",
verified: "downloads.tuxfamily.org/godotengine/"
name "Godot Engine"
desc "Game development engine"
homepage "https://godotengine.org/"

livecheck do
url "https://github.com/godotengine/godot"
regex(/^v?(3(?:\.\d+)+)[._-]stable$/i)
end

conflicts_with cask: "godot"
depends_on macos: ">= :sierra"

app "Godot.app"
binary "#{appdir}/Godot.app/Contents/MacOS/Godot", target: "godot"

uninstall quit: "org.godotengine.godot"

zap trash: [
"~/Library/Application Support/Godot",
"~/Library/Caches/Godot",
"~/Library/Saved Application State/org.godotengine.godot.savedState",
]
end
37 changes: 37 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cask "google-japanese-ime@dev" do
version :latest
sha256 :no_check

url "https://dl.google.com/japanese-ime/dev/GoogleJapaneseInput.dmg",
verified: "dl.google.com/japanese-ime/"
name "Google Japanese Input Method Editor"
desc "Japanese input software"
homepage "https://www.google.co.jp/ime/"

pkg "GoogleJapaneseInput.pkg"

# Some launchctl and pkgutil items are shared with other Google apps, they should only be removed in the zap stanza
# See: https://github.com/Homebrew/homebrew-cask/pull/92704#issuecomment-727163169
# launchctl: com.google.keystone.daemon, com.google.keystone.system.agent, com.google.keystone.system.xpcservice
# pkgutil: com.google.pkg.Keystone
uninstall launchctl: [
"com.google.inputmethod.Japanese.Converter",
"com.google.inputmethod.Japanese.Renderer",
],
pkgutil: "com.google.pkg.GoogleJapaneseInput"

zap launchctl: [
"com.google.keystone.agent",
"com.google.keystone.daemon",
"com.google.keystone.system.agent",
"com.google.keystone.system.xpcservice",
"com.google.keystone.xpcservice",
],
pkgutil: "com.google.pkg.Keystone",
trash: [
"~/Library/Application Support/Google/JapaneseInput",
"~/Library/Logs/GoogleJapaneseInput",
"~/Library/Saved Application State/com.google.inputmethod.Japanese.Tool.ConfigDialog.savedState",
"~/Library/Saved Application State/com.google.UninstallGoogleJapaneseInput.savedState",
]
end
87 changes: 87 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
cask "gpg-suite@nightly" do
version "3519n"
sha256 "53a9bd45e25a15167129fcfa3ce161f6fa8dd6b919b64aa2809eac14afab78f3"

url "https://releases.gpgtools.org/nightlies/GPG_Suite-#{version}.dmg"
name "GPG Suite Nightly"
desc "Tools to protect your emails and files"
homepage "https://gpgtools.org/"

livecheck do
url "https://releases.gpgtools.org/nightlies/"
regex(/href=.*?GPG_Suite-([0-9a-z]+)\.dmg/i)
end

auto_updates true
conflicts_with cask: [
"gpg-suite",
"gpg-suite-no-mail",
"gpg-suite-pinentry",
], formula: "gpg"
depends_on macos: ">= :mojave"

pkg "Install.pkg"

uninstall_postflight do
["gpg", "gpg2", "gpg-agent"].map { |exec_name| Pathname("/usr/local/bin")/exec_name }.each do |exec|
exec.unlink if exec.exist? && exec.readlink.to_s.include?("MacGPG2")
end
end

uninstall launchctl: [
"org.gpgtools.gpgmail.enable-bundles",
"org.gpgtools.gpgmail.patch-uuid-user",
"org.gpgtools.gpgmail.user-uuid-patcher",
"org.gpgtools.gpgmail.uuid-patcher",
"org.gpgtools.Libmacgpg.xpc",
"org.gpgtools.macgpg2.fix",
"org.gpgtools.macgpg2.gpg-agent",
"org.gpgtools.macgpg2.shutdown-gpg-agent",
"org.gpgtools.macgpg2.updater",
"org.gpgtools.updater",
],
quit: [
"com.apple.mail",
"org.gpgtools.gpgkeychain",
"org.gpgtools.gpgkeychainaccess",
"org.gpgtools.gpgmail.upgrader",
"org.gpgtools.gpgservices",
# TODO: add "killall -kill gpg-agent"
],
script: {
executable: "#{staged_path}/Uninstall.app/Contents/Resources/GPG Suite Uninstaller.app/Contents/Resources/uninstall.sh",
sudo: true,
},
pkgutil: "org.gpgtools.*",
delete: [
"/Library/Application Support/GPGTools",
"/Library/Frameworks/Libmacgpg.framework",
"/Library/Mail/Bundles.gpgmail*",
"/Library/Mail/Bundles/GPGMail.mailbundle",
"/Library/PreferencePanes/GPGPreferences.prefPane",
"/Library/Services/GPGServices.service",
"/Network/Library/Mail/Bundles/GPGMail.mailbundle",
"/private/etc/manpaths.d/MacGPG2",
"/private/etc/paths.d/MacGPG2",
"/private/tmp/gpg-agent",
"/usr/local/MacGPG2",
]

zap trash: [
"~/Containers/com.apple.mail/Data/Library/Frameworks/Libmacgpg.framework",
"~/Library/Application Support/GPGTools",
"~/Library/Caches/org.gpgtools.gpg*",
"~/Library/Containers/com.apple.mail/Data/Library/Preferences/org.gpgtools.*",
"~/Library/Frameworks/Libmacgpg.framework",
"~/Library/HTTPStorages/org.gpgtools.*",
"~/Library/LaunchAgents/org.gpgtools.*",
"~/Library/Mail/Bundles/GPGMail.mailbundle",
"~/Library/PreferencePanes/GPGPreferences.prefPane",
"~/Library/Preferences/org.gpgtools.*",
"~/Library/Services/GPGServices.service",
]

caveats do
files_in_usr_local
end
end
40 changes: 40 additions & 0 deletions Casks/h/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cask "hyper@canary" do
arch arm: "arm64", intel: "x64"

version "4.0.0-canary.5"
sha256 arm: "b23c51a1a2c6a0c1940965f959d30a6a185111954204132402aa29038d30ad98",
intel: "4f0182611a650e83a8b5084e6f64e03c62c600641d5adb5af6f3253a796415d8"

url "https://github.com/vercel/hyper/releases/download/v#{version}/Hyper-#{version}-mac-#{arch}.zip",
verified: "github.com/vercel/hyper/"
name "Hyper"
desc "Terminal built on web technologies"
homepage "https://hyper.is/"

livecheck do
url "https://releases-canary.hyper.is/"
regex(/hyper-(\d+(?:\.\d+)*.+)-mac-#{arch}\.zip/i)
end

auto_updates true
conflicts_with cask: "hyper"
depends_on macos: ">= :high_sierra"

app "Hyper.app"
binary "#{appdir}/Hyper.app/Contents/Resources/bin/hyper"

zap trash: [
"~/.hyper.js",
"~/.hyper_plugins",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.zeit.hyper.sfl*",
"~/Library/Application Support/Hyper",
"~/Library/Caches/co.zeit.hyper",
"~/Library/Caches/co.zeit.hyper.ShipIt",
"~/Library/Cookies/co.zeit.hyper.binarycookies",
"~/Library/Logs/Hyper",
"~/Library/Preferences/ByHost/co.zeit.hyper.ShipIt.*.plist",
"~/Library/Preferences/co.zeit.hyper.helper.plist",
"~/Library/Preferences/co.zeit.hyper.plist",
"~/Library/Saved Application State/co.zeit.hyper.savedState",
]
end
22 changes: 22 additions & 0 deletions Casks/i/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cask "inso@beta" do
version "9.0.0-beta.5"
sha256 "ef022cfb82a756bbdf0f7cd10b5ed5567205a19bf4bb802adda2db1402f6c0bf"

url "https://github.com/Kong/insomnia/releases/download/lib%40#{version}/inso-macos-#{version}.zip",
verified: "github.com/Kong/insomnia/"
name "inso"
desc "CLI HTTP and GraphQL Client"
homepage "https://insomnia.rest/products/inso"

livecheck do
url "https://github.com/Kong/insomnia/releases?q=prerelease%3Atrue+Inso+CLI"
regex(%r{href=["']?[^"' >]*?/tag/lib%40([^"' >]+?)["' >]}i)
strategy :page_match
end

conflicts_with cask: "inso"

binary "inso"

# No zap stanza required
end
42 changes: 42 additions & 0 deletions Casks/i/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
cask "insomnia@alpha" do
version "9.0.0-beta.5"
sha256 "c2ceb27a13f960c6f37bc51b87e8a46e33f170f5b0ad220f175d052591ebda49"

url "https://github.com/Kong/insomnia/releases/download/core%40#{version}/Insomnia.Core-#{version}.dmg",
verified: "github.com/Kong/insomnia/"
name "Insomnia"
desc "HTTP and GraphQL Client"
homepage "https://insomnia.rest/"

livecheck do
url :url
regex(/^core@v?(\d+(?:\.\d+)+[._-](?:alpha|beta|rc)[._-]?\d*)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"]

match = release["tag_name"]&.match(regex)
next if match.blank?

match[1]
end
end
end

auto_updates true
conflicts_with cask: "insomnia"
depends_on macos: ">= :catalina"

app "Insomnia.app"

zap trash: [
"~/Library/Application Support/Insomnia",
"~/Library/Caches/com.insomnia.app",
"~/Library/Caches/com.insomnia.app.ShipIt",
"~/Library/Cookies/com.insomnia.app.binarycookies",
"~/Library/Preferences/ByHost/com.insomnia.app.ShipIt.*.plist",
"~/Library/Preferences/com.insomnia.app.helper.plist",
"~/Library/Preferences/com.insomnia.app.plist",
"~/Library/Saved Application State/com.insomnia.app.savedState",
]
end
45 changes: 45 additions & 0 deletions Casks/i/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cask "intellij-idea@eap" do
arch arm: "-aarch64"

version "2024.1.1,241.15989.21"
sha256 arm: "5b723e93e7881293c5f9c5e952ee948b05b810297180cc9f4cb5af7dcffb4350",
intel: "5ca986476c72219bb16c1af3daf02f6aa3df6dec25f327a9b6027ea5e85e5813"

url "https://download.jetbrains.com/idea/ideaIU-#{version.csv.second}#{arch}.dmg"
name "IntelliJ IDEA EAP"
desc "IntelliJ IDEA Early Access Program"
homepage "https://www.jetbrains.com/idea/nextversion"

livecheck do
url "https://data.services.jetbrains.com/products/releases?code=IIU&release.type=eap"
strategy :json do |json|
json["IIU"].map do |release|
"#{release["version"]},#{release["build"]}"
end
end
end

auto_updates true
depends_on macos: ">= :high_sierra"

app "IntelliJ IDEA.app", target: "IntelliJ IDEA #{version.csv.first} EAP.app"

uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "idea") }.each do |path|
if File.readable?(path) &&
File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
File.delete(path)
end
end
end

zap trash: [
"~/Library/Application Support/JetBrains/IntelliJIdea#{version.csv.first}",
"~/Library/Caches/JetBrains/IntelliJIdea#{version.csv.first}",
"~/Library/Logs/JetBrains/IntelliJIdea#{version.csv.first}",
"~/Library/Preferences/com.jetbrains.intellij.plist",
"~/Library/Preferences/IntelliJIdea#{version.csv.first}",
"~/Library/Preferences/jetbrains.idea.*.plist",
"~/Library/Saved Application State/com.jetbrains.intellij.savedState",
]
end
Loading