2 arch arm: "arm64", intel: "x86-64bit"
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"
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"
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"
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"
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"
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"
66 on_ventura :or_newer do
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"
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]}" }
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"