2018-02-17 14:05:05 +00:00
|
|
|
class Mas < Formula
|
|
|
|
desc "Mac App Store command-line interface"
|
|
|
|
homepage "https://github.com/mas-cli/mas"
|
2018-10-15 04:07:41 +00:00
|
|
|
url "https://github.com/mas-cli/mas.git",
|
2021-09-09 01:09:20 +00:00
|
|
|
tag: "v1.8.3",
|
|
|
|
revision: "aeeb1c508e98d657769ef4e368a113be7822d92e"
|
2020-09-07 16:09:28 +00:00
|
|
|
license "MIT"
|
2021-10-25 23:38:38 +00:00
|
|
|
head "https://github.com/mas-cli/mas.git", branch: "main"
|
2018-02-17 14:05:05 +00:00
|
|
|
|
|
|
|
bottle do
|
2021-10-25 23:38:38 +00:00
|
|
|
sha256 cellar: :any_skip_relocation, arm64_monterey: "a6f0cd804841db315c3d253d922aecc23fc3bbcdc530b1bcf4da71998052d4a8"
|
|
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "6498917d8d2106fa582aa0fd0714cd87ad7d091023c7b3c6b2db3a6051a2fb5b"
|
|
|
|
sha256 cellar: :any_skip_relocation, monterey: "d6b735b08844da39f1889732932600f297e5bb92b2e391b0ab7ea6ba2fb89bfc"
|
|
|
|
sha256 cellar: :any_skip_relocation, big_sur: "0116c8f800780c890dc819ff3479640f3b33ef235af9fe0bc7a53202b35c9b82"
|
|
|
|
sha256 cellar: :any_skip_relocation, catalina: "015c0e53aee08c429ff468fc2a9c8b0bc973df084c0e6366d92905714f20248b"
|
2018-02-17 14:05:05 +00:00
|
|
|
end
|
|
|
|
|
2021-03-20 15:49:44 +00:00
|
|
|
depends_on :macos
|
2021-02-13 19:32:29 +00:00
|
|
|
if Hardware::CPU.arm?
|
|
|
|
depends_on xcode: ["12.2", :build]
|
|
|
|
else
|
2021-05-02 19:57:48 +00:00
|
|
|
depends_on xcode: ["12.0", :build]
|
2021-02-13 19:32:29 +00:00
|
|
|
end
|
2018-08-17 21:24:59 +00:00
|
|
|
|
2018-02-17 14:05:05 +00:00
|
|
|
def install
|
2021-05-07 04:19:37 +00:00
|
|
|
system "script/build"
|
2018-10-17 22:48:35 +00:00
|
|
|
system "script/install", prefix
|
2018-08-13 03:43:06 +00:00
|
|
|
|
2018-08-16 23:38:42 +00:00
|
|
|
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
|
2019-01-29 22:20:16 +00:00
|
|
|
fish_completion.install "contrib/completion/mas.fish"
|
2018-08-13 03:43:06 +00:00
|
|
|
end
|
|
|
|
|
2018-02-17 14:05:05 +00:00
|
|
|
test do
|
|
|
|
assert_equal version.to_s, shell_output("#{bin}/mas version").chomp
|
2021-05-07 04:19:37 +00:00
|
|
|
assert_includes shell_output("#{bin}/mas info 497799835"), "Xcode"
|
2018-02-17 14:05:05 +00:00
|
|
|
end
|
|
|
|
end
|