homebrew-core/Formula/repo.rb

32 lines
857 B
Ruby

class Repo < Formula
include Language::Python::Shebang
desc "Repository tool for Android development"
homepage "https://source.android.com/source/developing.html"
url "https://gerrit.googlesource.com/git-repo.git",
tag: "v2.30",
revision: "d686365449ade2480a23f86531a5b6630fcbb7a0"
license "Apache-2.0"
version_scheme 1
bottle do
sha256 cellar: :any_skip_relocation, all: "869a0dc6da6a214018cacecf878480a88962a41eab61005038ea8040f0d78460"
end
uses_from_macos "python"
def install
bin.install "repo"
doc.install (buildpath/"docs").children
# Need Catalina+ for `python3`.
return if OS.mac? && MacOS.version < :catalina
rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"repo"
end
test do
assert_match "usage:", shell_output("#{bin}/repo help 2>&1")
end
end