2024-10-26 20:21:28 +00:00
|
|
|
# typed: strict
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# mas command formula for homebrew-core tap.
|
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",
|
2023-11-25 21:19:39 +00:00
|
|
|
tag: "v1.8.7-beta.1",
|
|
|
|
revision: "f8be3e9aaa6c78490277976f17041f2577f5dc21"
|
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
|
2023-11-25 20:45:09 +00:00
|
|
|
sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b11bfefcb43e9a423ff301f7bbc29b0fb86044bf93442f243c5a8a67d8d4869"
|
|
|
|
sha256 cellar: :any_skip_relocation, arm64_ventura: "e49511dd1283813c4420aec9fc3b3167d18f9fdbb51d82b1e479b628d5312342"
|
|
|
|
sha256 cellar: :any_skip_relocation, arm64_monterey: "379d46e2657be295321f1603dc1df28130ea0b5b264ceb192a9ba488d77c7a98"
|
|
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "918a1484de106940f7bebc936e1ded87d7b65652054b09204887ad0651937ec4"
|
|
|
|
sha256 cellar: :any_skip_relocation, sonoma: "24e3057991ea1eed52eb4a27c0f17d794106770621e5a8bb975477dae135b82d"
|
|
|
|
sha256 cellar: :any_skip_relocation, ventura: "6ef7788e28c46cdc0f916812f49dfeb1fabf2240a8c36f33ce34bcfb9df1502f"
|
|
|
|
sha256 cellar: :any_skip_relocation, monterey: "6b313f2f66d028cb7782c108d6e502ce73ccb9c08fac3bece0b057fcce5c4689"
|
|
|
|
sha256 cellar: :any_skip_relocation, big_sur: "50b50f51219143fcb69c730b52b74011a76104f66348ea727d0200f7b375ae25"
|
|
|
|
sha256 cellar: :any_skip_relocation, catalina: "d241d3b9156b033f3d2c31684a44de726297e07fd9bd5e3ccc4c36e4f1c3baf3"
|
2018-02-17 14:05:05 +00:00
|
|
|
end
|
|
|
|
|
2021-03-20 15:49:44 +00:00
|
|
|
depends_on :macos
|
2023-11-25 20:45:09 +00:00
|
|
|
on_arm do
|
2021-02-13 19:32:29 +00:00
|
|
|
depends_on xcode: ["12.2", :build]
|
2023-11-25 20:45:09 +00:00
|
|
|
end
|
|
|
|
on_intel do
|
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
|