mas/Homebrew/mas.rb

47 lines
2 KiB
Ruby
Raw Permalink Normal View History

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"
url "https://github.com/mas-cli/mas.git",
tag: "v1.8.7-beta.1",
revision: "f8be3e9aaa6c78490277976f17041f2577f5dc21"
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
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
depends_on :macos
on_arm do
depends_on xcode: ["12.2", :build]
end
on_intel do
depends_on xcode: ["12.0", :build]
end
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
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