26 lines
894 B
Ruby
26 lines
894 B
Ruby
cask "unity" do
|
|
version "2021.2.7f1,6bd9e232123f"
|
|
sha256 "e81a2ff7c296c9f45a2ce951eba8814b14746242f921bd267f45b5913746a992"
|
|
|
|
url "https://download.unity3d.com/download_unity/#{version.csv.second}/MacEditorInstaller/Unity-#{version.csv.first}.pkg",
|
|
verified: "download.unity3d.com/download_unity/"
|
|
name "Unity Editor"
|
|
desc "Platform for 3D content"
|
|
homepage "https://unity.com/products"
|
|
|
|
livecheck do
|
|
url "https://public-cdn.cloud.unity3d.com/hub/prod/releases-darwin.json"
|
|
strategy :page_match do |page|
|
|
page.scan(%r{/download_unity/(\h+)/MacEditorInstaller/Unity-(\d+(?:\.\d+)+[a-z]*\d*)\.pkg}i).map do |match|
|
|
"#{match[1]},#{match[0]}"
|
|
end
|
|
end
|
|
end
|
|
|
|
pkg "Unity-#{version.csv.first}.pkg"
|
|
|
|
uninstall quit: "com.unity3d.UnityEditor5.x",
|
|
pkgutil: "com.unity3d.UnityEditor5.x",
|
|
delete: "/Applications/Unity"
|
|
end
|