32 lines
859 B
Ruby
32 lines
859 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.29.3",
|
|
revision: "acc4c857a0b6e2e33e3647028cbd312498fd5900"
|
|
license "Apache-2.0"
|
|
version_scheme 1
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "8d7aa92c76d4487745f162dc8892a0abbdc6edfa3e0c24efcab2d4beec3cad5f"
|
|
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
|