Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / mysql-shell.rb
blob0db4ddfb984b1a6a8652aefc08092909fff9381c
1 cask "mysql-shell" do
2   arch arm: "arm64", intel: "x86-64bit"
4   on_sierra :or_older do
5     version "8.0.12,10.13-x86-64bit"
6     sha256 "7e4f01f4f5c9f4567b2eafa6ffefe502096be89e4cdfb9952e6d379be8fffe7f"
8     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}.dmg"
10     livecheck do
11       skip "Legacy version"
12     end
13   end
14   on_high_sierra do
15     version "8.0.18,10.14-x86-64bit"
16     sha256 "23676e36670ae4753583344e012066782d09c7df3ed11d2611d604c85d91693d"
18     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}.dmg"
20     livecheck do
21       skip "Legacy version"
22     end
23   end
24   on_mojave do
25     version "8.0.23,10.15-x86-64bit"
26     sha256 "75ee22c5cf7fd4dda05c87ea5bfcbd46e76a589c2132de4f875cd8605514315b"
28     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}.dmg"
30     livecheck do
31       skip "Legacy version"
32     end
33   end
34   on_catalina do
35     version "8.0.27,11-x86-64bit"
36     sha256 "3214e9d35b4950cd326b0bef3b9c582cf01957fbf64cebce4b7bb85b7e38add9"
38     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}.dmg"
40     livecheck do
41       skip "Legacy version"
42     end
43   end
44   on_big_sur do
45     version "8.0.29,12"
46     sha256 arm:   "7095eaa8c67a8952101e0e6173645ac4377b1c06df5e8f87ceddea418d79b5a6",
47            intel: "971e88d93f477437b7b6507408c0c31183f36af7922b7c2f6570ec314779ad20"
49     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}-#{arch}.dmg"
51     livecheck do
52       skip "Legacy version"
53     end
54   end
55   on_monterey do
56     version "8.0.34,13"
57     sha256 arm:   "c67890eff6829afbc234260b3f54d34cb65b699e53ae59520b94feee8e337d71",
58            intel: "6fd9e3855e70028b88a05ba6be76e9101a601f1416fd6c0eb2078169dbe8937d"
60     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}-#{arch}.dmg"
62     livecheck do
63       skip "Legacy version"
64     end
65   end
66   on_ventura :or_newer do
67     version "9.1.0,14"
68     sha256 arm:   "e4b1f8546b4c7871ad7e8833fb83f01e78493759f60b8c8b19f194249bffb3c7",
69            intel: "20f5911123d0cd6fde1bb6a0951654bb0203e59699aa8365cadfe681a4d3e34b"
71     url "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-#{version.csv.first}-macos#{version.csv.second}-#{arch}.dmg"
73     livecheck do
74       url "https://dev.mysql.com/downloads/shell/?tpl=platform&os=33"
75       regex(/mysql[._-]shell[._-]v?(\d+(?:\.\d+)+)[._-]macos(\d+)[._-]#{arch}\.dmg/i)
76       strategy :page_match do |page, regex|
77         page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
78       end
79     end
80   end
82   name "MySQL Shell"
83   desc "Interactive JavaScript, Python or SQL interface"
84   homepage "https://dev.mysql.com/downloads/shell/"
86   depends_on macos: ">= :sierra"
88   pkg "mysql-shell-#{version.csv.first}-macos#{version.csv.second}-#{arch}.pkg"
90   uninstall pkgutil: "com.mysql.shell"
92   zap trash: "~/.mysqlsh"
93 end